[OSM-talk] Copenhagen Data

Christopher Schmidt crschmidt at crschmidt.net
Sun Jun 18 07:19:01 BST 2006


On Sun, Jun 18, 2006 at 07:57:37AM +0200, Erik Johansson wrote:
> On 6/18/06, Christopher Schmidt <crschmidt at crschmidt.net> wrote:
> >http://crschmidt.net/mapping/openlayers/copenhagen.html
> >
> >Dutch_DK plans on uploading another 8 months of Kismet logs and
> >finishing more of the map, but in the meantime, I personally think that
> >he deserves a round of applause, because that's pretty cool work.
> 
> That's some nice progress, but if  all of those are  tagged with names
> as well then I'm really impressed.

Of the 889 ways in the file, 12 aren't tagged with a name. I've just
added support for the rendering of names to the map, so if you turn on
the ways layer and zoom in, you should be able to see it.

> > http://crschmidt.net/mapping/openlayers/merc.html
> 
> Alot nicer than the other projection, and the Ways doesn't get
> offsetted either. It was actually very hard for me to recognise
> København, on the first link. Funny how much those things matters.

I obviously don't recognize it either way ;)

> BTW do you have some kind of notes on how to do the 
> planet.osm->??->openlayers?

* Convert .osm to GML:
  http://wiki.openstreetmap.org/index.php/Converting_OSM_to_GML
  (This step is completed for you via
  http://london.freemap.in/output/planet_simple.gml.gz , 16MB download.)
* Convert GML to Shapefile:
  ogr2ogr -f "ESRI Shapefile" planet.shp planet.gml
* Set up mapserver with a mapfile pointing to your newly generated
  shapefile:
   http://wiki.openstreetmap.org/index.php/Displaying_OSM_Shapefiles_In_Mapserver
  is an example mapfile.

Of course, if you just want to display it in OpenLayers, you can use the
WMS that's already set up for the May Planet dump by copy pasting the
layer definition from the HTML file at
http://london.freemap.in/planetosm.html: 

var osm_wms = new OpenLayers.Layer.WMS( "OpenStreetMap Streets",
    "http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/london/map/osm.map",
    {layers: "default_segment,segments,class_segment",
     transparent: "true", format: "image/png" });

It's my plan to keep the dataset powering that URL up to date with the
latest planet at all times.

-- 
Christopher Schmidt
Web Developer




More information about the talk mailing list