Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when i try to export into shapefile a tempory layer that have a geometry type changed from original layer #28053

Closed
qgib opened this issue Oct 26, 2018 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions

Comments

@qgib
Copy link
Contributor

qgib commented Oct 26, 2018

Author Name: Fabio Scarpari (Fabio Scarpari)
Original Redmine Issue: 20232
Affected QGIS version: 3.2.3
Redmine category:geometry


Hi, i write to report a bug of QGIS 3.2.3. A few days ago i wanted a new shapefile with geometry "Line (LineString)" from a shapefile with the geometry type "Line (MultiLineString)". I saw on forum that there are not only way to change geometry type: 1) "Convert format" from "processing toolbox" (GDAL-Vector conversion-Convert format), 2) with a script on Windows 7 64bit launched with cmd. Here there is a example: ogr2ogr -f "ESRI Shapefile" E:\Prova\Pippo\test.shp E:\test.shp -dim XY . Outputs of both command are right, but are virtual layers. When i export temporary layers into shapefiles both layers changes from "Line (LineString)" to "Line (MultiLineString)". I tried to use also command v.out.ogr, loaded on postgis the layer, changed the geometry and inserted into QGIS. QGIS showed not Line (LineString). I tried to convert geometry type of layer from multiline to single line inserted z. The geometry type was now singleline with(z). I exported and the output is right but had also z. For this reason i did "Drop M,Z values" and then exported in shapefile, but the result is Line (multiline string). Thanks for support.

@qgib
Copy link
Contributor Author

qgib commented Oct 26, 2018

Author Name: Nyall Dawson (@nyalldawson)


Since QGIS 3.0 line or polygon shapefiles are always loaded into QGIS as multilinestring/multipolygon. If you require a format with single/multi type constraints, you need to use a more modern format like geopackage.


  • resolution was changed from to wontfix
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Oct 26, 2018
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions
Projects
None yet
Development

No branches or pull requests

1 participant