Skip to content

This script build to parse OSM pbf data by admin boundary and specific tags. This tool using OSMOSIS and OSMCONVERT as the main tools to run the script.

License

Notifications You must be signed in to change notification settings

osm-indo/osm-data-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osm-data-script

This script was developed to address a problem where a country level PBF is still too big to download or analysed. Thus, the purpose of the script is to clip OSM PBF data by sub national admin boundaries (in .poly format). The example result of this script can be accessed at the OSM Indonesia Data (English | Indonesia) page.

An additional Osmosis command performed to count how many buildings within each clipped PBF file to provide overview of how many buildings have been mapped per province. The simple graph of the result can be accessed at Building Statistic Report (English | Indonesia) page.

It is recommended to run the command in cron jobs to automate the process periodically.

Requirements

  • Osmosis, to filter the building tag inside the PBF file
  • Osmconvert, to chop the PBF file and count the buildings inside the PBF
  • Poly files (put it all under poly folder), the script will automatically split based on the content of this directory. Surely it will only work if the sub-national boundary still within country boundary.

Start the script

$ python scriptosm.py <geofabrik-country-url-link>

Example

$ python scriptosm.py https://download.geofabrik.de/asia/indonesia-latest.osm.pbf

About

This script build to parse OSM pbf data by admin boundary and specific tags. This tool using OSMOSIS and OSMCONVERT as the main tools to run the script.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •