views:

247

answers:

3

Hello, everybody.

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

But I expected to be like this one alt text

was it wrong OSM file that I used from Cloudmade?

Thank you for your help.

+4  A: 

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,

tonio
Thank you tonio for your reply. Hmm, is osm file only contains data, tonio? I can't use osm layer because I want to use the map offline (no internet connection). So that, I have to build my own map server. Is there a result screenshot from the second link (mapserver/wiki) you gave me?
bhoo-day
+5  A: 

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.

igorti
Thank you igorti for your reply, I actually have seen this tutorial as well. But the main problem is I have to download almost 10GB planet file. Unfortunately, my country internet speed is terrible. When I found Indonesia OSM on cloudmade I was so happy. I thought I can achieve same map like OpenStreetMap without using planet file. Anyway, have you ever used planet file?
bhoo-day
No, I didn't, but I should definetely give it a try!There should be no difference between using whole planet or just certain country. Did you follow the guide above step-by-step and it's not wotking?
igorti
Yeah, the result was not as I expected. I'm afraid that I missed steps from the tutorial above.
bhoo-day
You can download smaller planet files for particular regions at: http://download.geofabrik.de/osm/ for you, this would mean ~200Mb for australia-oceania, perhaps that is a better starting point?
milovanderlinden
A: 

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:

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.

David Winslow