Hello,

Thanks a lot.

I'll have a look at OSM xml as well as yours and work around them.

In TeleAtlas shape files I don't have a simple attribute like Z order,
bridges/tunnel level or elevation.
That's the hardest part I think. With some table joins I can have this
information but for some road elements I have two (or more) elevation
information because a long segment could be above one and below another ... 
That's where things are going hard.

I think I have to do like you, having one single elevation attribute for
every single road element.

I will let you know in case another TeleAtlas user would need it too.

Nicolas. 

-----Message d'origine-----
De : Marcin Rudowski [mailto:[email protected]] 
Envoyé : mardi 22 septembre 2009 16:30
À : Nicolas Gillet - MARKET-IP
Cc : [email protected]
Objet : Re: [Mapnik-users] Neat roads junction and elevation

2009/9/22 Nicolas Gillet - MARKET-IP <[email protected]>:
> I see on OpenStreetMap, as well as on Google Maps that they can draw
> everything right so I am wondering what’s the trick.

Draw first tunnels with full casing+fillings, next roads below surface
(casing+fillings), next normal roads (casing+fillings), bridges level
1 (casing+filing), bridges level 2 (casing+filling). To avoid end caps
on the middle of road, draw casing with caps of all roads before all
above, and use casings without caps in final layers.

In each layer roads are sorted as You described (first minor, then
major) and also first style for casing and then style for fillings in
scheme:
<Layer name="layer_name">
    <StyleName>style_for_casing</StyleName>
    <StyleName>style_for_fill</StyleName>
    <Datasource>
        &db_settings;
        <Parameter name="table">
            (select * from planet_osm_line where .............. order
by z_order) as temp_name
        </Parameter>
    </Datasource>
</Layer>

z_order gives sorting by street importance.

Also I use separate column ([layer]) to add condition in where clause
for each of the layers described above:
layer = '- 2' : tunnels (dashed casings, bright filling)
layer = '-1' : roads below surface but with style of normal roads
layer = '0' or NULL : normal roads
layer = '1' : bridges (dark casings)
layer = '2' : second level bridges with same style as normal bridges

This way roads on same level (same layer column value) join in neat
way and on different levels are separated.

I based my xml's on OSM, so there should be similar solution. You can
find their mapnik settings in svn:
http://wiki.openstreetmap.org/wiki/Mapnik
svn checkout http://svn.openstreetmap.org/applications/rendering/mapnik

Here is my example with 2 levels of bridges crossing each other and normal
road:
http://mapa.ump.waw.pl/ump-www/?zoom=17&lat=52.29489&lon=21.01494&layers=B00
000FT

In my case road elevation is implemented in source files (garmin *.mp
format) as values assign to nodes with possible interpolation, so I
need to divide roads to segments by level at conversion stage and
assign appropriate layer column value to each, before importing to
postgresql db. So in db available to mapnik, elevation is attribute of
whole road segment and I can use this for simple sql queries.

Mine xml files are available through cvs:
cvs -d:pserver:[email protected]/home/cvsroot co
narzedzia/ump-www/mapnik_style/
but it's a little bit messy, not optimal and specific to some UMP-pcPL
project conventions.

-- 
Marcin Rudowski

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to