[OSM-dev] Rendering rivers in real width
Sven Geggus
lists at fuchsschwanzdomain.de
Sat Feb 11 10:33:35 GMT 2012
Hello,
on Osmarender I once implemented rendering of rivers, stream, canal,
etc. in their real width. A Cartographer once told me that unlike
roads waterbodies are usually drawn in their real extent on maps
after all.
With Osmarender beeing abandoned now, there will soon be no map
available anymore which includes such a feature.
Thus I just commited a small patch for osm2pgsql which will produce
suitable "width" columns with real values for this.
I have already been able to render a small test Map using Mapserver
and this simple Style:
LAYER
MAXSCALEDENOM 500000
STATUS ON
GROUP "default"
CONNECTIONTYPE postgis
CONNECTION "dbname=gis"
PROCESSING "CLOSE_CONNECTION=DEFER"
TYPE LINE
NAME "rivers"
# 10m is the default width
DATA "way from (select way,osm_id,coalesce(width, 10) as width from planet_osm_line
where waterway in ('river','canal','derelict_canal','stream','drain','ditch','wadi'))
as foo using unique osm_id using srid=900913"
SIZEUNITS meters
CLASS
STYLE
MAXWIDTH 200
WIDTH [width]
COLOR "#0000ff"
END
END
END
It has been said that something like this is not possible to do in Mapnik (at least in
version 1).
So, talking about Mapnik2, ist there a way fo a data-driven control
of stroke-width in LineSymbolizer.
Sven
--
Unix is simple and coherent, but it takes a genius – or at any rate a
programmer – to understand and appreciate the simplicity
(Dennis M. Ritchie)
/me is giggls at ircnet, http://sven.gegg.us/ on the Web
More information about the dev
mailing list