Ticket #345 (assigned enhancement)

Opened 16 months ago

Last modified 10 months ago

Deepcopy and Pickle support for Boost Python objects

Reported by: springmeyer Owned by: springmeyer
Priority: normal Milestone: 1.0.0
Component: Core Library Version: 0.6.0
Severity: Normal Keywords:
Cc: josh@…, tim@… Patch Needs Improvement: no
Needs Docmentation: no Has Patch?: no
Design Decision Needed: no

Description (last modified by springmeyer) (diff)

Pickling support will be a major advancement for Mapnik as it will allow for:

1) maps (or sub objects) to be serialized in binary form, which will be potentially 1000's of times faster to load than xml and

2) allow for bundling of map objects along with other pickled info (think rendering directives, auxillary styles, serialized data - geojson) and

3) will allow for serialization of Map state as well as the basic styles and layers and

4) will be easy to marshall into pickle-based datastores (think custom django fields or couchdb) and

5) will have potentially lots of other uses

I've added pickling support to a few of the main container objects exposed in the Python bindings. But many more objects need pickling support added.

Copy and Deepcopy are supported in boost via the same support needed for pickling. http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/pickle.html

We need to discuss how to accomplish this (fairly) extensive task to complete full pickle/deepcopy support of Mapnik objects in python, and this ticket will track status (and super-cede other pickle-related tickets).

List of boost python cpp files that need pickle/copy support added or extended:

Change History

Changed 16 months ago by springmeyer

  • owner changed from artem to springmeyer
  • status changed from new to assigned
  • milestone changed from 0.6.1 to 1.0.0

Changed 16 months ago by springmeyer

Note: this ticket condenses/super-cedes #233, #234, #167

Changed 16 months ago by springmeyer

and #205

Changed 16 months ago by springmeyer

  • description modified (diff)

Objects that need pickling are:

Changed 16 months ago by springmeyer

  • description modified (diff)

mapnik.Coord pickling added in r1147

Changed 16 months ago by springmeyer

problem with layer pickling fixed in r1148

Changed 16 months ago by springmeyer

pickling of styles fixed in r1149

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 16 months ago by springmeyer

  • description modified (diff)

Changed 15 months ago by springmeyer

  • cc josh@… added

via brentp: http://code.google.com/p/pickled-object-database/ cc'ed josh re: stylecache

Changed 15 months ago by springmeyer

  • cc josh@… added; josh@… removed

fix'ed josh's email

Changed 15 months ago by springmeyer

Note: I've begun work on source:trunk/bindings/python/mapnik_rule.cpp, which is the big boost::visitor dispatch spot. But, I've run out of time to get it working. If anyone starts working on it get in touch.

Changed 12 months ago by springmeyer

  • description modified (diff)

added pickling support for PointSymbolizer in r1295. We should in the future look into pickling the actual image data...

Changed 12 months ago by springmeyer

slight fix to TextSymbolizer pickling in r1298 - removing the attempt to pickle fonsets as they are not even exposed in python bindings yet (see: #348)

Changed 11 months ago by springmeyer

  • description modified (diff)

another fix to TextSymbolizer in r1314

Changed 11 months ago by springmeyer

  • description modified (diff)

r1342, r1344 added large patch to finish full draft support for pickling all Map objects

Changed 10 months ago by tcarobruce

  • cc tim@… added
Note: See TracTickets for help on using tickets.