A number of folks on both mapnik-users@ and mapnik-devel@ have wanted to be
able to add points dynamically, whether in C++ or in Python.
A short while ago, I posted a patch to fix commented-out functionality in
mapnik::memory_datasource that was needed to do so in C++ (see
http://trac.mapnik.org/ticket/111).

Here I am contributing a patch (a superset of the patch attached to ticket
#111) which also implements the requisite Python bindings needed to utilize
the proposed "point_datasource" functionality. Artem will probably need to
sort through the patch and figure out how to adapt it to his larger Mapnik
design vision, but in the meanwhile, users / developers looking for this
functionality can use it in the meantime.

The patch file is attached to this message and to
http://trac.mapnik.org/ticket/113

Sample use of this functionality is demonstrated here on github:
    http://gist.github.com/8702#LID26

The patch adds basic mapnik::query support, to allow geometry-based
programmatic filtering, as well as a "PointDatasource" object (line 50).
Points are added programmatically simply by calling "add_point", and linking
the point datasource to its corresponding data layer.

In this example, we plot three Mountains in Washington State.

~L

Attachment: python_point_datasource.patch
Description: Binary data

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

Reply via email to