artemp/trac2github — Issue #529: Allow "virtual" datasources to be created from python
Author: artemp
Created: 2011-10-09 20:39:11+00:00
State: open
Labels: Boost_Python_Binding

It would be very useful to be able to instantiate a memory_datasource and load it programatically with features from python.

Some use-cases:

* Being able to dynamically create features...:
* ... to render special markers at certain explicit points (eg: lower-right corner of every tile).
* ... derived from other datasources and render them with available symbolizers (eg: arrows with a given angle and size derived two rasters with U and V vector components)
* Easily create fixtures for unit-testing of mapnik itself.

By skimming the code I see several sub-tasks:

* Create a Boost::Python binding for memory_datasource.
* Allow Feature and Geometry2d to be instantiated from python.
* (optional but useful) Implement a wkb writer so geometries can be "seen" from python.