osmium-tool | Command line tool for working with OpenStreetMap data | Map library
kandi X-RAY | osmium-tool Summary
kandi X-RAY | osmium-tool Summary
Command line tool for working with OpenStreetMap data based on the Osmium library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of osmium-tool
osmium-tool Key Features
osmium-tool Examples and Code Snippets
Community Discussions
Trending Discussions on osmium-tool
QUESTION
I am looking for bounding box data for individual states which exist within countries. For eg, for India - states like Andhra Pradesh, Karnataka etc or for Norway - bbox for Akershus, Aust-Agder etc.
One approach I know is download extracts from Geofabrik and use osmium-tool
to get the bounding box data from that using this command -
osmium fileinfo -e -g data.bbox victoria-latest.osm.pbf
However, Geofabrik does not have the states for many countries like India, China, Indonesia, Austria, etc.
One alternative to that is to use extracts from download.openstreetmap.fr. Their extracts unfortunately have very incorrect bounding box values. For eg, the bounding box for Victoria state in Australia covers half of Australia. I've noticed this problem many of their extracts. Bhutan's bounding box covers 3x the lateral area. Malaysia's extract covers half of Indian ocean. This makes their extracts unusable to extract the bounding box data from.
Apart from this approach, there are also data sets like this - https://gist.github.com/graydon/11198540
However, these do not contain states and regions as you can see.
Where can I find this data? or, if possible, can I extract it from OSM in some way using Overpass? I am looking for any way or method to get this data. Even a comment pointing me in the right direction will help. Thanks.
...ANSWER
Answered 2021-Oct-21 at 18:11I found the needed data for states/regions/provinces of all the countries in the Natural Earth data - https://www.naturalearthdata.com/.
However, after working with it, I realised that this data is quite old and for many countries it has states it does not have the new states or provinces (for eg, Telengana in India was established in 2014 as a new state, yet that does not exist in this data set).
The 1:110m
only had country boundaries and boundaries for USA states. 1:50m
had country boundaries + state boundaries for North America, Australia and some other regions but not for the whole world. The 1:10m
downloads have the states for all the countries in the world. Download this file -
https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_1_states_provinces.zip
For a more updated and detailed version, use the level-1 shape file from this extract- https://biogeo.ucdavis.edu/data/gadm3.6/gadm36_levels_shp.zip
This python script extracts the bounding box value for all the states for all the countries in the world and stores it in a csv file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install osmium-tool
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page