Changes between Initial Version and Version 3 of Ticket #1486


Ignore:
Timestamp:
Mar 26, 2007, 9:57:25 PM (17 years ago)
Author:
warmerdam
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1486

    • Property Priority highestnormal
  • Ticket #1486 – Description

    initial v3  
    1 {{{
     1
    22[Originally posted to FWTools list February 2007, and Frank suggested that I submit as an enhancement request against GDAL]
    33
    44I 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:
    55
     6{{{
    67  def __getstate__(self):
    78      return self.ExportToWkb()
     
    1112      self.thisown = result.thisown
    1213      result.thisown = 0
     14}}}
    1315
    1416Note that a similar thing was done in Python Cartographic Library's geometry.py--see trac changeset 411:
     
    1719Frank'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."
    1820
    19 
    2021Best regards,
    2122Jack
    22 }}}