[GIS] How to get India OSM map offline in geoserver which looks similar to online OSM map

geoserverindiaopenstreetmaposmosispostgis

I need to OSM map of India having same look and feel as of Online OSM map. I have done following steps for the same :

  1. I have downloaded India map OSM data from below link :

    http://download.geofabrik.de/asia/india.html – >india-latest.osm.pbf

  2. Exported this osm pbf file data in postgis DB using osmosis. so, below are the tables generated in DB :

    actions, nodes, relation_members, relations, schema_info, users, way_nodes, ways

  3. I tried to publish these tables as vector layer in geoserver. however, it doesnt display anything.

So, please suggest me the next step/correct me if I am doing anything wrong.

My final goal is to get offline map of India (without internet), which looks same as of online OSM map.

Based on other posts I tried using tilemill/mapbox. however, I am not clear about the imported India Map data in Postgis+tilemill/mapbox relation. And, the relation between tilemill/mapbox + geoserver.

I am implementing GIS solution using Geoserver+PostGIS+Openlayers technologies.

Best Answer

If you want to use a postgis database with Openstreetmap data, you have to populate it with osm2pgsql, not osmosis.

That is the only way to get polygons out of Openstreetmap multipolygon relations and closed ways in a format that GIS software can understand.

Alternatively, you can use GDAL ogr2ogr to save OSM data into a spatialite database.

Once you have the data in a database, you have to create rendering rules that look the same as the official Mapnik renderer uses. But that is worth another question.

It might be easier (and faster to display) to get tiles from Mapnik, tilemill or maperitive, and use them as a local openlayers datasource.