Hi

I'm trying to do osm-rendering on a temporal indexed database. My database contains features with a valid_from and a valid_to column. My Style contains appropriate WHERE-Conditions so select all features from the database that were valid at a specific point in time.

My Test-Application now uses the python bindings to render the map. It gets the BBox and Date to render the map from supplied via command line. It now has to feed the date into the Stylesheet, so that it can be included at the right place into the queries.

The question is: how to do this nicely - pass Parameters from Python to the Stylesheet.

Two obvious solutions would be
- preprocess the style with "xmllint --noent", collect the xml into a string and replace some placeholder, eg. {DATE} with the requested timestamp, then use mapnik.load_map_from_string. This requires the libxml2-utils to be installed.

- preprocess the style with the python sax-parser and replace the placeholder on the go, assemble everything on the go and feed mapnik with it.

The question is: is there a nicer way to go?

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

Reply via email to