Skip to content

Import OSM India data locally

Arun Ganesh edited this page Jul 24, 2019 · 1 revision

Import OpenStreetMap data for India

Setup

  1. Setup postgres with postgis
  2. Setup osm2pgsql and download the default osm import schema default.style
  3. Create an empty postgis database called gis for the data as the user postgres
createdb -U postgres gis
psql -U postgres -d gis -c 'create extension postgis;'
psql -U postgres -d gis -c 'create extension hstore;'

Import

  1. Download the latest India extract from Geofabrik: india-latest.osm.pbf
  2. Import the pbf into postgres database gis using osm2pgsql
osm2pgsql -U postgres -H localhost -P 5432 ~/Downloads/india-latest.osm.pbf --cache 6000 --hstore-column 'name:' --style ~/Downloads/default.style 
Clone this wiki locally