Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-24 Thread Paolo Cavallini
Hi,

On 24/01/19 13:03, matteo wrote:
> Hi Matthias,
> 
>> What's the ultimate goal of this?
>>
>> Being able to create shapefiles that are compatible with software that
>> only supports single-geometry-type features?

yes, I think this is a possible user case.
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-24 Thread matteo
Hi Matthias,

> What's the ultimate goal of this?
> 
> Being able to create shapefiles that are compatible with software that
> only supports single-geometry-type features?

no particular reasons, just scratching the surface of this exportation

Thanks Matthias for the feedback

Matteo
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-22 Thread Matthias Kuhn
Hi Matteo,

What's the ultimate goal of this?

Being able to create shapefiles that are compatible with software that
only supports single-geometry-type features?

Best regards

Matthias

On 1/22/19 8:44 AM, matteo wrote:
> sorry, encrypted
>
> On 1/22/19 8:43 AM, matteo wrote:
>> Hi Matthias,
>>
>> thanks for the feedback and inputs. Well the topic is going tricky:
>>
>> * create a new line (just line because shapefile is not able to
>> understand single/multi) in Q3
>> * add a line and some parts to the same line
>> * load the shape in Q2
>> * the shape is already recognized as Linestring (and not Multilinestring)
>> * using the Processing algorithm works fine (lines are "separated"
>> well), but the layer remains, of course, Linestring
>>
>> The same approach in Q3 works fine. Before the algorithm the shapefile
>> is read as Multilinestring and after the algorithm as Linestring
>>
>> Does it make sense?
>>
>> Cheers and thanks
>>
>> Matteo
>>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-22 Thread matteo
Another idea..

in the "Export as" dialog there is the chance to choose the geometry
type (no multi, only single) and a checkbox to "Force multi-type". So it
seems missing the option to "Force single-type"

What do you think?

Is it worth a ticket to remind it?

Cheers and thanks

Matteo
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread matteo
sorry, encrypted

On 1/22/19 8:43 AM, matteo wrote:
> Hi Matthias,
> 
> thanks for the feedback and inputs. Well the topic is going tricky:
> 
> * create a new line (just line because shapefile is not able to
> understand single/multi) in Q3
> * add a line and some parts to the same line
> * load the shape in Q2
> * the shape is already recognized as Linestring (and not Multilinestring)
> * using the Processing algorithm works fine (lines are "separated"
> well), but the layer remains, of course, Linestring
> 
> The same approach in Q3 works fine. Before the algorithm the shapefile
> is read as Multilinestring and after the algorithm as Linestring
> 
> Does it make sense?
> 
> Cheers and thanks
> 
> Matteo
> 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread Matthias Kuhn
So the question is how to write single part features to shapefiles?

I think it might work to use the processing alg "multipart to
singlepart" to write such a shapefile.

Matthias

On 1/21/19 6:07 PM, Paolo Cavallini wrote:
> good point. the problem remains: older software may accept only
> linestrings, and apparently qgis is creating shp with multilinestrings
> even in case of single lines. any way to force simple geom during creation?
> Thanks.
>
> On 21/01/19 18:00, Matthias Kuhn wrote:
>> If I understand correctly, the page states that each *feature* can be
>> multi- or singletype, whereas the question here was why the whole
>> *layer* is detected as multitype.
-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread Paolo Cavallini
good point. the problem remains: older software may accept only
linestrings, and apparently qgis is creating shp with multilinestrings
even in case of single lines. any way to force simple geom during creation?
Thanks.

On 21/01/19 18:00, Matthias Kuhn wrote:
> If I understand correctly, the page states that each *feature* can be
> multi- or singletype, whereas the question here was why the whole
> *layer* is detected as multitype.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread Matthias Kuhn
If I understand correctly, the page states that each *feature* can be
multi- or singletype, whereas the question here was why the whole
*layer* is detected as multitype.

Bests

On 1/21/19 5:58 PM, Paolo Cavallini wrote:
> Apparently there is a declaration of multi vs simple:
> https://www.gdal.org/drv_shapefile.html
> Shapefile of type SHPT_ARC, the corresponding layer will be reported as
> of type wkbLineString, but depending on the number of parts of each
> geometry, the actual type of the geometry for each feature can be either
> OGRLineString or OGRMultiLineString
> cheers
>
> On 21/01/19 17:43, Matthias Kuhn wrote:
>> Hi Matteo,
>>
>> In shapefiles, there is no LineString or Polygon, all line layers are
>> MultiLineString and polygon layers MultiPolygon.
>>
>> Only points come in multi and non-multi versions.
>>
>> Cheers
>>
>> Matthias
>>
>>
>> On 1/21/19 5:31 PM, matteo wrote:
>>> Hi devs,
>>>
>>> in QGIS 3 a shapefile is recognized as MultiLineString, while in QGIS 2
>>> the same file is recognized as LineString. What could be the reason?
>>>
>>> Moreover: is there and option to force to read a shapefile as LineString?
>>>
>>> Cheers and thanks
>>>
>>> Matteo
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>> -- 
>> Matthias Kuhn
>> matth...@opengis.ch 
>> +41 (0)76 435 67 63 
>> OPENGIS.ch Logo 
>>
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread Paolo Cavallini
Apparently there is a declaration of multi vs simple:
https://www.gdal.org/drv_shapefile.html
Shapefile of type SHPT_ARC, the corresponding layer will be reported as
of type wkbLineString, but depending on the number of parts of each
geometry, the actual type of the geometry for each feature can be either
OGRLineString or OGRMultiLineString
cheers

On 21/01/19 17:43, Matthias Kuhn wrote:
> Hi Matteo,
> 
> In shapefiles, there is no LineString or Polygon, all line layers are
> MultiLineString and polygon layers MultiPolygon.
> 
> Only points come in multi and non-multi versions.
> 
> Cheers
> 
> Matthias
> 
> 
> On 1/21/19 5:31 PM, matteo wrote:
>> Hi devs,
>>
>> in QGIS 3 a shapefile is recognized as MultiLineString, while in QGIS 2
>> the same file is recognized as LineString. What could be the reason?
>>
>> Moreover: is there and option to force to read a shapefile as LineString?
>>
>> Cheers and thanks
>>
>> Matteo
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> -- 
> Matthias Kuhn
> matth...@opengis.ch 
> +41 (0)76 435 67 63 
> OPENGIS.ch Logo 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread Matthias Kuhn
Hi Matteo,

In shapefiles, there is no LineString or Polygon, all line layers are
MultiLineString and polygon layers MultiPolygon.

Only points come in multi and non-multi versions.

Cheers

Matthias


On 1/21/19 5:31 PM, matteo wrote:
> Hi devs,
>
> in QGIS 3 a shapefile is recognized as MultiLineString, while in QGIS 2
> the same file is recognized as LineString. What could be the reason?
>
> Moreover: is there and option to force to read a shapefile as LineString?
>
> Cheers and thanks
>
> Matteo
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] LineString vs MultiLineString - QGIS2 vs QGIS 3

2019-01-21 Thread matteo
Hi devs,

in QGIS 3 a shapefile is recognized as MultiLineString, while in QGIS 2
the same file is recognized as LineString. What could be the reason?

Moreover: is there and option to force to read a shapefile as LineString?

Cheers and thanks

Matteo
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer