[GIS] How to split osm data

algorithmopenstreetmaposmosissplitting

I have a gigantic OSM geodata file of a city, and I want to split it into smaller files according to each group of tags.

I googled it up and i found that there is a jar file caller splitter.jar . i downloaded it and made a test with a small osm geodata, but what i got is a .pbf file which is not readable.

is there any recommended software to split the osm data or i have to do it programmatically?

Best Answer

The "swiss-knife" for OpenStreetMap data is osmosis. It's a command-line Java application for linux and windows. Learn-OSM provides a great introduction for new users. With osmosis you can split OSM files by a bbox, a polygon or by specific tags. Check out the latest detailed usage wiki page for more information.