1

I'm trying to extract data from planet.osm.pbf with osmium and ogr2ogr as a CSV file. However some relations seem to be missing in the output. For example, this relation doesn't show up as a multipolygon.

I am using

osmium getid planet.osm.pbf r3492137 -r -o culver_city.pbf

and then

ogr2ogr -f "CSV" -lco SEPARATOR="TAB" -overwrite culver_city.csv ../culver_city.pbf

But the resulting multipolygons.csv is empty (without any error). The lines.csv seems to contain the ways that make up the relation.

The same thing seems to work properly for other relations like this one. What could be wrong?

1

1 Answer 1

1

This could be because those relations are not properly tagged as type=multipolygon in the OSM data. The ogr2ogr command only converts relations with this tag to multipolygons in the output file.

To fix the problem, double check that the missing relations are correctly tagged as type=multipolygon in the OSM data, if not, correct it and run the command again. If it still doesn't work, try using the -explodecollections option to see if the missing data is stored elsewhere in the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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