[OSM-dev] curves

Artem Pavlenko artem.mapnik at googlemail.com
Thu Jan 3 15:16:47 GMT 2008


Hello,

Perhaps, not well know fact but Mapnik can render bezier curves. The  
reason it is not being used is the lack of support for curves in  
common GEO formats.
I'm adding support for on-fly 'smooth' polygons/lines , which can be  
controlled by providing smooth parameter (0.0 - 2.0)  i.e:

  <Rule>
       <Filter>[natural] = 'lake' or [natural] = 'water'</Filter>
       <MaxScaleDenominator>5000000</MaxScaleDenominator>
       <PolygonSymbolizer>
         <CssParameter name="fill">&water_color;</CssParameter>
	<CssParameter name="smooth">1.0</CssParameter>
      </PolygonSymbolizer>
     </Rule>

It is very fast and you can see the result : http:// 
artem.dev.openstreetmap.org/files/smooth_1.0.png
(note that text following curve as well)

I know tah has been using bezier curves by pre-processing geometries  
for while.

What people think about explicitly supporting curves as a part of  
geometry model? This way we can model the world better.

Thoughts?

Artem

P.S. Are there some hints (tags) in OSM that can be used for to  
smooth or not?
Also, are there are examples where it does work well and where it  
doesn't?







More information about the dev mailing list