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%20Maner's gravatar image

Reshma Maner
235273136
accept rate: 0%

edited 09 Jan '16, 14:42

aseerel4c26's gravatar image

aseerel4c26 ♦
32.1k16239551

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

(06 Jan '16, 11:22) svenky1980
1

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

(06 Jan '16, 17:31) malenki

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.

(01 Feb '17, 10:12) Gagan

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

permanent link

answered 25 Dec '15, 22:25

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
70.6k826411105
accept rate: 24%

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

permanent link

answered 25 Dec '15, 12:54

iii's gravatar image

iii
4.9k63880
accept rate: 11%

edited 06 Jan '16, 12:17

SomeoneElse's gravatar image

SomeoneElse ♦
32.1k63332751

2

When data gets copied it is still the same even if a copy exists in two places afterwards.
There not a single sane reason to use extracts which were explicitly created to lessen the load on OSM's main server and to lessen the data users labour in the regard that he hasn't to process a full planet.

(25 Dec '15, 16:28) malenki
1
(25 Dec '15, 16:30) malenki
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×239
×195

question asked: 25 Dec '15, 11:22

question was seen: 6,076 times

last updated: 01 Feb '17, 10:12

powered by OSQA