Bug report #20232
Bug when i try to export into shapefile a tempory layer that have a geometry type changed from original layer
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Geometry | ||
Affected QGIS version: | 3.2.3 | Regression?: | No |
Operating System: | Windows 7 64 bit | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28053 |
Description
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.
History
#1 Updated by Nyall Dawson about 6 years ago
- Resolution set to wontfix
- Status changed from Open to Closed
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.