Changes between Initial Version and Version 3 of Ticket #1486
- Timestamp:
- Mar 26, 2007, 9:57:25 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1486
- Property Priority highest → normal
-
Ticket #1486 – Description
initial v3 1 {{{ 1 2 2 [Originally posted to FWTools list February 2007, and Frank suggested that I submit as an enhancement request against GDAL] 3 3 4 4 I have a Python (v2.3.5-based) application which stores OGR feature geometry objects (<OGRFeature>.GetGeometryRef().Clone()) in a dict. To support pickling of these OGRGeometry instances (w/o spatial reference system), I added the following __getstate__ and __setstate__ methods to the Geometry class in (my copy of) ogr.py: 5 5 6 {{{ 6 7 def __getstate__(self): 7 8 return self.ExportToWkb() … … 11 12 self.thisown = result.thisown 12 13 result.thisown = 0 14 }}} 13 15 14 16 Note that a similar thing was done in Python Cartographic Library's geometry.py--see trac changeset 411: … … 17 19 Frank's response to my posting of this on the FWTools list included the comment: "I don't like that the spatial reference would not be captured though I can see that doing so would be quite hard." 18 20 19 20 21 Best regards, 21 22 Jack 22 }}}