I used yesterday, in QGIS 3.2.3 the tool to convert multiline to a single line ("multipart to single part").

I chose the option of the command "multipart to single part" the geometry feature (line) and marked z dimensions. QGIS save right the temporary layer in format shape, a shapefile with z dimension included.

When I tried to eliminate z dimension with ogr2ogr and inserted in QGIS, the program consider that the layer is a single line geometry. Who can help me?

  • Single (as not multi) or simple (as not having Z values)? Also, can you provide the ogr2ogr command you are using. Oct 20 '18 at 8:08
  • I have a layer (.shp) with multiline (i see that on layer's proprieties). I did the command multipart to singlepart to change layer's proprieties from multiline to singleline. QGIS in this way view a new temporary layer with singlepart, this is so good! When i tried to export that temporarely layer i saw on proprieties that this shape had multiline not single line. The question is how to keep geometry singleline when create a new shapefile from a temporary layer that have single line. Better?
    – Fabolous
    Oct 23 '18 at 10:24
  • I have a right new shapefile (not temporary) with singleline geometry when i insert z within the "multipart single part" command. I don't want a shapefile with singleline and z, but only single line. But if i drop z and then export temporary layer, the new shapefile have multiline string not single!
    – Fabolous
    Oct 23 '18 at 10:27
  • I used ogr2ogr but not work, QGIS show that new layer have multiline string not single!
    – Fabolous
    Oct 23 '18 at 10:34

In QGIS, the purpose of the Multipart to singlepart tool is not to change the layer's geometry type, but instead to separate features containing several (geometry) parts into individual features.

If you want to change the layer geometry type, you can the Convert Geometry Type instead. In the New geometry type option select Linestrings.

  • I used Convert Geometry Type and the output is right (single line), but the layer is temporary (virtual). It's isn't a shapefile saved on disk. For this reason i tried to export temporary layer as a new shapefile with right geometry (single line e not "Line (MultiLineString)", but not work.
    – Fabolous
    Oct 23 '18 at 12:24
  • Instead of using a temporary layer as output, select the path to your disk in the format you need. Oct 23 '18 at 12:33
  • I clicked on command Convert Geometry Type, i chosed the input layer that i need and i selected into "new geometry type" the geometry "linestrings". I clicked on button located near "Create temporary layer", then i did "Save to file" and saved it into D:\, the new layer has "Line (MultiLineString)". It is not right, i would Line (LineString)
    – Fabolous
    Oct 23 '18 at 13:01
  • 1
    You are right Sir, I just tried it with some local data. There is something wrong with the export function. Oct 23 '18 at 13:16
  • 1
    Better create a ticket on the bug tracker: issues.qgis.org/projects/qgis/issues Oct 23 '18 at 13:19

Three days ago they are answered to my QGIS ticket. They said that from QGIS 3.0 the program load always multi part geometry. The only way to work with single part geometry, is work with new format geopackage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.