Ticket #113 (new defect)

Opened 3 months ago

Last modified 8 weeks ago

Support adding points dynamically in Python

Reported by: lwu Owned by: artem
Priority: major Milestone: 0.5.2
Component: Boost.Python Binding Version: SVN Trunk
Severity: Normal Keywords:
Cc: Patch Needs Improvement: no
Needs Docmentation: no Has Patch?: yes
Design Decision Needed: yes

Description

Mapnik's Python binding lacks sufficient functionality to easily implement the ability to add points dynamically (programmatically) in Python.

I have attached a patch which addresses this problem, by taking the patch attached to ticket #111 and implementing a number of Python binding codes which were not yet implemented.

Programmatic addition of data points in Python seems to be a frequent request on the mailing lists, and thus this functionality seems particularly useful to support.

Attachments

python_point_datasource.patch (9.4 kB) - added by lwu 3 months ago.
Support for python-based point datasources

Change History

Changed 3 months ago by lwu

Support for python-based point datasources

Changed 3 months ago by lwu

Changed 3 months ago by springmeyer

lwu,

nice patch.

I was able to patch and rebuilt mapnik on mac 10.5 with no problems. I then downloaded your sample code and it worked perfectly.

These were my steps:

cd ~/src/mapnik-svn-trunk
wget http://trac.mapnik.org/raw-attachment/ticket/113/python_point_datasource.patch
patch -p0 -i python_point_datasource.patch # then rebuild mapnik...
cd ~/projects/mapnik-utils/trunk/sample_data
wget http://edcftp.cr.usgs.gov/pub/data/nationalatlas/statesp020.tar.gz
tar svf statesp020.tar.gz
rm statesp020.tar.gz
echo 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]' > statesp020.prj

Changed 8 weeks ago by springmeyer

  • priority set to major

Changed 8 weeks ago by springmeyer

  • patch_need_improvement unset
  • version set to SVN Trunk
  • need_documentation unset
  • milestone set to 0.5.2
  • has_patch set
  • design_decision_needed set
Note: See TracTickets for help on using tickets.