Help with rendering maps

Hello all,

I am new to OSM, I just downloaded one with the local Vancouver BC Canada area and am looking forward to working with you all.

Here is my question:

I’ve written an open-source application for GeoCaching that draws maps with the GeoCaches overlayed onto the maps ( it’s almost all my own code and entirely in c++). It also will draw track logs and other items on top as well.
It currently renders Google Tile maps, and Garmin IMG format maps. I would like to add rendering support for Open Street maps as well.

I took about 2 hours yesterday and I now have it rendering OSM files (by parsing the XML format) so far but with only simple lines for roads and polys for closed objects. Now what I would like to know is if there a FAQ for settings so I can calculate what colors to draw closed polys and road thickness so I can draw highways larger and small roads smaller etc.

You can see some screenshots of my program so far here:

http://code.google.com/p/gpsturbo/

Thanks for any assistance,
Kevin

cool,
you should talk with the author of GSAK to see if could Incorporated in to that program, for “offline” map reading.

GSAK is a commerical program, mine is open-source under the GPL so they are not compatible.

Cross post from: http://forum.openstreetmap.org/viewtopic.php?pid=7510#p7510

This is how the two main renders configure what should have what symbol:

*Mapnik: osm.xml stylesheet
*Osmarender: stylesheet and Rules
*JOSM editor: stylesheets

Thanks for the links to the stylesheets, they really help.

I just wrote a quick c++ program to extract the colors and various style / draw settings from it to generate the data tables that my c++ map renderer will use.

I am a bit confused though about the ocean / coastline rendering, I don’t see the data for it in the osm xml file. Is it in there?

The Mapnik xml stylesheet just refers to these files ( see below ), is this stored seperately from rest of the map data??

  <Layer name="world-1" status="on" srs="+proj=merc +datum=WGS84 +over">
    <StyleName>world-1</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">/home/steve/world_boundaries/world_boundaries_m</Parameter>
    </Datasource>
  </Layer>

  <Layer name="world" status="on" srs="+proj=merc +datum=WGS84 +over">
    <StyleName>world</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">/home/steve/world_boundaries/world_bnd_m</Parameter>
    </Datasource>
  </Layer>

  <Layer name="coast-poly" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">
    <StyleName>coast-poly</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">/home/steve/world_boundaries/processed_p</Parameter>
    </Datasource>
  </Layer>

  <Layer name="builtup" status="on" srs="+proj=merc +datum=WGS84 +over">
    <StyleName>builtup</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">/home/steve/world_boundaries/builtup_area</Parameter>
    </Datasource>
  </Layer>

Thanks
Kevin

Yes they are stored separately, there are in shapefiles, created with the coastline checker from OSM data. The coastline checker merges all the individual natural=coastline 's to one big area. See http://wiki.openstreetmap.org/index.php/Mapnik#World_Boundaries. Before the coastline checker, VMAP data was used for the rendering of oceans.

If you manage getting a renderer of coastlines directly from OSM data it would be a huge step forward, noone have done this yet. There are lots of tools for handling coastlines in perl and C, not at all easy.

Some interesting emails/discussions, though they aren’t a perfect match for what you want:
http://www.nabble.com/Coastline-not-updated-on-the-cycle-map—td19237192.html
http://www.mail-archive.com/dev@openstreetmap.org/msg03201.html