Hi all, I have a nice mapnik layer of which the results are visible under http://fietscomfort.openstreetmap.be/?zoom=16&lat=51.21213&lon=4.42138&layers=B0TFTFT
something strangs happens to some of the calculated numbers in the comfort tiles, where the rounding clearly does not work properly. example: http://fietscomfort.openstreetmap.be/fietsroutes-comfort/16/33572/21878.png the rendering of the numbers is based a style and the layer declarations , which follow below. any hint on the reasons for the round function not always working as expected? maybe there are alternative ways to accomplish the same, suggestions are welcome, since this is about the most complex query i've written so far :) bye, ivom <Style name="comfort-text"> <Rule> <MaxScaleDenominator>&maxscale_zoom12;</MaxScaleDenominator> <MinScaleDenominator>&minscale_zoom18;</MinScaleDenominator> <ShieldSymbolizer name="comfort" face_name="DejaVu Sans Bold" size="11" fill="white" placement="line" file="&mapnik_symbols;/tru_shield3.png" type="png" width="31" height="17" min_distance="30" spacing="500"/> </Rule> </Style> <Layer name="comfort lines" status="on" srs="&srs900913;"> <StyleName>comfort-text</StyleName> <Datasource><Parameter name="table"> ( select cast("cycleway:comfort" as numeric) as com ,(round(((34-cast("cycleway:comfort" as numeric))/2.8),1)) as comfort ,way from planet_osm_line where (cycleway='track' or cycleway='lane' or highway='cycleway') and "cycleway:comfort" IS NOT NULL order by z_order ) as roads </Parameter> &layer-settings; </Datasource> </Layer> _______________________________________________ Mapnik-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-devel
