Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Map like OpenStreetMap

I like the way OpenStreetMap display its map. It almost looks like Google Map. I have already installed GeoServer and PostGis on my notebook. I also got this cloudmade osm file for my country, Indonesia. I downloaded indonesia.osm.bz2.

I successfully imported it into my PostGis and did setup it on my GeoServer but it didn't display map same like OpenStreetMap. I chose planet_osm_polygon as my layer in GeoServer. At the end, I got this one displayed with openlayers. alt text http://deerawan.com/blogimages/map_polygon.jpg

But I expected to be like this one alt text http://deerawan.com/blogimages/map-indo.png

was it wrong OSM file that I used from Cloudmade?

Thank you for your help.

like image 642
deerawan Avatar asked Jul 29 '10 10:07

deerawan


People also ask

Is Google Maps better than OpenStreetMap?

OpenStreetMap has different features like local knowledge, open data and is community-driven. Google Map has more coverage as compared to OpenStreetMap in many countries, which makes it the leading map in many countries like the United States and Japan.

What type of map is OpenStreetMap?

OpenStreetMap is a global mapping project that creates and distributes a free editable map of the world. It is built by a community of volunteer mappers who use aerial imagery, GPS devices and field maps to verify the accuracy of OSM data.

What is the difference between Mapbox and OpenStreetMap?

Mapbox relies on collective mapping, with OpenStreetMap being its major source of data, and this has consequences. While the OSM project has enjoyed remarkable growth over the past ten years, its coverage in regions like India and China still needs some work.


3 Answers

I would recommend to follow this tutorial from Geoserver blog.

There you'll find a step by step guide on how to setup OSM data, including database import, styling, etc.

like image 92
igorti Avatar answered Dec 13 '22 10:12

igorti


The file you download contains just data. No information about the way it's displayed…

You got 2 solutions: - Use OSM directly in your map with a OpenLayers.Layer.OSM ( http://openlayers.org/dev/examples/osm.html ), - Use a cartographic server to style your data the way you want… (OSM uses mapnik, or you can use mapserver : http://trac.osgeo.org/mapserver/wiki/RenderingOsmData , no idea if they're available styles for geoserver )

HTH,

like image 45
tonio Avatar answered Dec 13 '22 11:12

tonio


GeoServer requires two things to render a map:

data

Just importing the OSM planet dump isn't enough to get a nice map, you need more than just roads and landmarks. OpenStreetMap adds a coastline dataset (which I think is actually derived from OpenStreetMap data, but pre-processed a bit for performance reasons) and some data from the Natural Earth project.

stylesheets

GeoServer uses the OGC SLD format for styles, so you'll need to find or create some SLD styles specific to the OpenStreetMap dataset. Here are a few suggestions of places you could look for them:

  • OpenStreetMap SLDs used on the OpenGeo OSM demo
  • OpenStreetMap in a box also includes some tools for keeping OpenStreetMap data up-to-date
  • OpenStreetMap tutorial on the GeoServer blog

I'm also working on a tool to convert Mapnik map files to GeoServer configurations. It works okay with the styles from MapQuest Open but still has some issues with the ones used for openstreetmap.org. If you want to give it a try though, bug reports are welcome.

like image 21
David Winslow Avatar answered Dec 13 '22 12:12

David Winslow