1

I'm trying to export all objects of East Kazakhstan region(as in image) from OSM file into separate pbf/osm file. What I'm trying to do is extract data from kazakhstan-latest.osm.pbf file by using osmconvert and osmfilter commands, but seems like it doesn't do what I would like to get.

After running the command:

./osmfilter kaz.o5m --verbose --keep="admin_level=4 and name=Восточно-Казахстанская\ область" -o=east2.osm

I see that my extracted file is only 3.1 Mb which is definitely small for such area.

-rw------- 1 sp sp 3.1M Aug 31 16:45 east2.osm

East Kazakhstan

4
  • 1
    can you add some explanation as to what you actual want to extract, I can confirm that following your command does give a small file of polylines in Western Kazakhstan and a few points (mostly on the western edge of the polylines)
    – Ian Turton
    Commented Aug 31, 2016 at 12:49
  • I would recommend you use a tool call JOSM.
    – saviour123
    Commented Aug 31, 2016 at 13:25
  • I need all objects that is actually located in the East Kazakhstan polygon. Commented Aug 31, 2016 at 13:25
  • I guess JOSM can't handle large areas of map. Commented Aug 31, 2016 at 13:26

1 Answer 1

1

You ask osmfilter to keep everything that has admin_level 4 and a certain name. That is NOT everything inside that border line which you intend to get.

Instead, use osmconvert to clip to the region of interest from the .pbf file:

http://wiki.openstreetmap.org/wiki/Osmconvert#Clipping_based_on_a_Polygon

You need to convert the border (which you already have filtered) to polygon style with one of the softwares listed at http://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format#Converting_to.2Ffrom_POLY_format .

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.