Bug report #20996
QGIS Master does not export from Multilinestring Geometry type and does not recognize Geometry Type Linestring saved by QGIS 2
Status: | Rejected | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Geometry | ||
Affected QGIS version: | 3.5(master) | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28815 |
Description
Hi all,
I need a Linestring type shapefile then:
- I tried to convert my data to Linestring using QGIS Master https://github.com/qgis/QGIS/commit/aafd84812e;
- the conversion come out with a correct "converted" memory file (Screenshot 1);
- I tried to save "converted" file to a permanent file (selecting Linestring Type from export dialog);
well,
- the new file Is a Linestring type while It is a memory (Screenshot 1) whereas if I load It from "Open Layer" as a new layer,
It change type in Multilinestring instead of a Linestring (Screenshot 2).
Moreover,
If I try to open a QGIS 2 (screenshot 3) converted Linestring in QGIS Master, the opened file It is yet Multilinestring (Screenshot 4)
I attach here the some screenshots and data (original data and Linestring data converted by Master and by QGIS 2)
Regards
History
#1 Updated by Nyall Dawson almost 6 years ago
- Resolution set to wontfix
- Status changed from Open to Rejected
This is by design. In qgis 3 line/polygon shapefiles are always treated as multipart. This is because the shapefile format does not differentiate between the two, and in qgis it is necessary to know in advance if ANY feature in the layer will be multipart. Use geopackage if you need strict single/multi typing.
#2 Updated by Antonio Viscomi almost 6 years ago
Hi Nyall,
Thanks for suggestion but...
Why allow to export shapefiles as Linestring?
Cheers
#3 Updated by Nyall Dawson almost 6 years ago
That list isn't filtered by export format -- I guess we should consider that!
#4 Updated by Antonio Viscomi almost 6 years ago
- File exported.gpkg added
- File gpkg_properties.tif added
Nyall Dawson wrote:
This is by design. In qgis 3 line/polygon shapefiles are always treated as multipart. This is because the shapefile format does not differentiate between the two, and in qgis it is necessary to know in advance if ANY feature in the layer will be multipart. Use geopackage if you need strict single/multi typing.
Nyall,
I just tried to export my multilinestring in Linestring in a gpkg as you suggested,
well the result is yet a multilinestring... Is there anything that is not clear to me?
I attach gpkg and screenshot here
Cheers