Hi, I have set up my own local OSM server. I want to download OSM data for India and few other countries from OSM server. I do not want to use third party provider's data like Geofabrik or BBike. How can I do it? asked 25 Dec '15, 11:22 Reshma Maner aseerel4c26 ♦ |
After downloading a full planet file, ideally in PBF format, from planet.openstreetmap.org or one of its mirrors, you would have to use one of the established tools like osmosis, osm-history-splitter, or osmconvert to cut out your area of interest from the world-wide data set. Note that downloading e.g. the Geofabrik Asia extract and then cutting out your area of interest from that will usually mean that you waste less bandwidth and get a more current file (Geofabrik files are updated daily while OSM planet files are only updated weekly). answered 25 Dec '15, 22:25 Frederik Ramm ♦ 1
Thank you. I have already downloaded india-latest.osm.pbf few months back and extracted on my OSM server. At that time size of this file was 175Mb. Now the latest India pbf file on Geofabrik website is of 300Mb. If I want to download this latest file and process it on my server, how can I do it? Will it overwrite current India data? Which command should I use?
(26 Dec '15, 06:08)
Reshma Maner
1
In order to give a meaningful answer to your question of how to process a new file and whether that will overwrite your current data, we need to know what you have done with the india-latest.osm.pbf that you downloaded last time. Did you import it into a database with osm2pgsql?
(26 Dec '15, 10:24)
Frederik Ramm ♦
1
Yes. I imported it into a database using osm2pgsql. Following command was used: sudo -u www-data osm2pgsql -C 2048 --slim --number-processes 4 india-latest.osm.pbf --cache-strategy sparse Now I want to update this data with latest downloaded file for India. How can i do this?
(29 Dec '15, 12:32)
Reshma Maner
2
If your import is very recent - less than 10 days ago or so - then you could download the India updates from the Geofabrik server and apply them to your database. However I assume your import will be much older than 10 days, and in that case it is advisable to simply download the current data file and run your above import command again, which will delete the old database and import and import everything anew.
(29 Dec '15, 13:03)
Frederik Ramm ♦
I run import command using new India map file. It did not give any error. But I can not see any changes in map. My mod tile directory is at a different location. path is mentioned in renderer.conf. Still updates map is not visible. What should I do?
(03 Jan '16, 11:16)
Reshma Maner
2
Your database is now current but your tiles are not. Your options are 1. run the same steps that you ran initially to create your tiles (most likely you used render_list to pre-render a batch of tiles?), or 2. simply delete your tile directory and then renderd will re-create the tiles when you try to view them (slow for zoom levels < 12), or 3. touch a planet-import-complete file in the tile directory which will cause mod_tile/renderd to try and re-create a tile on the fly and the old tile will be served only if this takes too long. Read mod_tile documentation on RequestTimeout and MissingRequestTimeout.
(03 Jan '16, 11:23)
Frederik Ramm ♦
My tile directory is at /var/lib/mod_tile. I deleted mod_tile directory from /var/lib. But renderd is not creating new directory as per your option number 2 suggested in above comment
(07 Jan '16, 09:13)
Reshma Maner
showing 5 of 7
show 2 more comments
|
While it is (strongly!) recommend to use a mirror, esp. if you consider to download a whole subcontinent, you can still download from the source: http://planet.openstreetmap.org answered 25 Dec '15, 12:54 iii SomeoneElse ♦ 2
When data gets copied it is still the same even if a copy exists in two places afterwards.
(25 Dec '15, 16:28)
malenki
1
Maybe you did you want to link the "use a mirror" to https://wiki.openstreetmap.org/wiki/Api.openstreetmap.org/Usage_policy#Alternative_OpenStreetMap_Data_Providers ?
(25 Dec '15, 16:30)
malenki
|
Reshma,
Can you please provide the India dataset download url/ link? I intend to download pan-India OSM, and can't figure out how.
Thanks
There are plenty links with which you should have solved the problem yourself. Since I am in the mood I duplicate the link from above: http://download.geofabrik.de/asia.html – there click on http://download.geofabrik.de/asia/india-latest.osm.bz2
If you are interested in osm map for a country only then osm-for-my-country may be helpful for you. It downloads and update data on daily basis. You can generate offline map tiles also with this. Its basically a stack of many osm related packages.