[OSM-dev] Rendering Rules

Artem Pavlenko artem.mapnik at googlemail.com
Fri Mar 14 13:46:46 GMT 2008


On 14 Mar 2008, at 13:36, Dave Stubbs wrote:

>>  I have been playing with the Mapnik source code for rendering some
>>  maps.  I have data in a custom format, so I had to write my own  
>> driver.
>>  Is there some place I can see the style definitions that are  
>> being used
>>  on Open Street Map?  For example, as you zoom in, a road may appears
>>  black.  Then as you zoom in, it changes to white with a black
>>  background.  (Python calls them Style and Rule and c++ calls them
>>  feature_type_style and rule_type).
>
>
> The rules are defined using mapnik's XML format.
> You can find the style file here:
> http://trac.openstreetmap.org/browser/applications/rendering/mapnik/ 
> osm.xml

Alternatively, all styles/rules/filters can be defined directly in  
Python.  Also, there is save_map method which will output *.xml .

rule_type (reflected as Rule in Python) type has {min,max} 
_scale_denominator properties which control when it's active.

Artem

>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev





More information about the dev mailing list