You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2008-08-26 22:10:12
- GPSTurbo
- Member
- Registered: 2008-08-26
- Posts: 3
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
Offline
#2 2008-08-26 23:44:49
- mtrax
- Member
- From: Canberra, Australia
- Registered: 2008-05-20
- Posts: 103
Re: Help with rendering maps
cool,
you should talk with the author of GSAK to see if could Incorporated in to that program, for "offline" map reading.
Offline
#3 2008-08-27 00:00:09
- GPSTurbo
- Member
- Registered: 2008-08-26
- Posts: 3
Re: Help with rendering maps
GSAK is a commerical program, mine is open-source under the GPL so they are not compatible.
Offline
#4 2008-08-27 08:11:06
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Help with rendering maps
Cross post from: http://forum.openstreetmap.org/viewtopi … 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
Offline
#5 2008-08-30 03:52:37
- GPSTurbo
- Member
- Registered: 2008-08-26
- Posts: 3
Re: Help with rendering maps
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
Offline
#6 2008-08-30 15:05:48
- Skywave
- Member
- Registered: 2007-11-13
- Posts: 91
Re: Help with rendering maps
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??
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 … Boundaries. Before the coastline checker, VMAP data was used for the rendering of oceans.
Last edited by Skywave (2008-08-30 15:07:40)
Offline
#7 2008-09-01 08:34:34
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Help with rendering maps
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-upd … 37192.html
http://www.mail-archive.com/dev@openstr … 03201.html
Last edited by emj (2008-09-01 08:34:54)
Offline
Pages: 1