Skip to content

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).

License

Notifications You must be signed in to change notification settings

iyan31/osm-data-script

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 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 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).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 85.5%
  • Python 14.5%