After I remove the water from openstreetmap, I lost the administrative boundary and properties. How to save them?

Viewed 28

now I am handling the indonesia's map data from openstreetmap. I get the region datas whose admin_level equals "4". Then I remove the water part through this way,https://stackoverflow.com/questions/25297811/how-can-i-remove-water-from-openstreetmap-ways.But I lose the administrative boundary,either.Who can give me some suggestion to resave them. My target is just to remove the water part from the original data. Firstly, I get the pbf data of Indonesia from openstreetmap. secondly, I get the multipolygons from the pbf through a python script:

thirdly, I remove the water part by ogr2ogr.

ogr2ogr -f GeoJSON ID_filter_level_44.geo.json -clipsrc ID_level_4.geo.json land_polygons.id.shp 

And now, I get the file ID_filter_level_44.geo.json, but it's geometry is all "polygon" type. and some diffrent administration are merged.

0 Answers
Related