I want to take a bounding box, use the OpenStreetMap API and get a tile, then use it as a background in basemap. This should be easy, but I haven't been able to figure out the API.
Asked
Active
Viewed 2,387 times
1 Answers
1
Go to OSM website (http://www.openstreetmap.org), choose a BBOX and select export.
When you take data from OSM you'll get just the data. You'll need to import it to your database/QGIS/Geoserver and apply some styles to see the data as seen in OSM map. I know nothing about matplotlib-basemap.
To import the data to PostgreSQL you can use osm2pgsql:
osm2pgsql -C 2500 -c -d database_target -U postgre_user -W -s -S ./your_style_file.style your_osm_file.osm
Your database_target must have the GIS extensions.
Getting the same beautiful OSM map appearance is not so easy since there is no official style file to download. You must dig it.
Magno C
- 2,140
- 3
- 24
- 63
*.osmfile with all data. Beyond this point I can't help you. – Magno C Jun 24 '16 at 01:26