I am quite new to the topic of handling geodata, so I face my first big challenge now:

I downloaded an osm file containing information about any kind of data related to power generators, transformer stations etc. (http://enipedia.tudelft.nl/wiki/Extracting_Power_Data_from_OpenStreetMap). I successfully loaded this file to QGIS, where I started using the save as option to simply save it as a shapefile. This worked fine for points and lines, but not for multipolygons and multilines. As I think I know now it´s because shapefiles do not support these types (correct?). So I tried an advice from our forum to use the geometry tool multi to onepart. But now when I try this I get the error

len() should return >= 0 See log for more details

Has anybody faced the same problem? My overall goal here is just to use this dataset as a shapefile.

Update: Maybe also an relevant information is that the properties of the layer display "Number of objects in this layer: -1"

  • Shapefile supports multipolygon, but the export will fail if the source data has geometry errors like self-intersecting or zero-length arcs. So you better check that before. – AndreJ May 31 '17 at 15:59

In editing mode select "Edit -> Split parts"

enter image description here

In batch mode in geoprocessing toolbar search filed print "part" and select "Multipart to singleparts" tool.

enter image description here

Also it worth using some database like SpatiaLite or GeoPackage. The ESRI Shape files have numerous limitations and are very ancient GIS format.

  • Unfortunately the option split parts is not available for me to choose, do you have an idea why? – Glubi May 31 '17 at 8:29
  • Do you enable editing (see pen icon in buildings on my screenshot) and select this layer in Layer tree? – Dmitry Baryshnikov May 31 '17 at 11:59
  • The edit pen is also greyed out - maybe there is an error in the file itself? – Glubi May 31 '17 at 14:00
  • This format is read-only. Export to some editing capable format and then edit it. – Dmitry Baryshnikov Jun 1 '17 at 8:50
  • I tried to export the file to SpatialLite - I got the error the saved file has no layers. I also tried to export it to geopackage and here the files had only a few KBs size although they should be around a few hundred MBs – Glubi Jun 2 '17 at 11:37

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.