Changeset 11679
- Timestamp:
- 06/21/07 00:37:50 (1 year ago)
- Files:
-
- trunk/gdal/swig/include/ogr.i (modified) (2 diffs)
- trunk/gdal/swig/python/ogr_wrap.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/swig/include/ogr.i
r11678 r11679 549 549 } 550 550 551 551 %newobject GetSpatialRef; 552 552 OSRSpatialReferenceShadow *GetSpatialRef() { 553 553 OGRSpatialReferenceH ref = OGR_L_GetSpatialRef(self); 554 OSRReference(ref); 554 if( ref ) 555 OSRReference(ref); 555 556 return (OSRSpatialReferenceShadow*) ref; 556 557 } … … 1301 1302 } 1302 1303 1304 %newobject GetSpatialReference; 1303 1305 OSRSpatialReferenceShadow* GetSpatialReference() { 1304 return (OSRSpatialReferenceShadow*)OGR_G_GetSpatialReference(self); 1306 OGRSpatialReferenceH ref = OGR_G_GetSpatialReference(self); 1307 if( ref ) 1308 OSRReference(ref); 1309 return (OSRSpatialReferenceShadow*) ref; 1305 1310 } 1306 1311 trunk/gdal/swig/python/ogr_wrap.cpp
r11672 r11679 2581 2581 #include "cpl_port.h" 2582 2582 #include "cpl_string.h" 2583 #include "ogr_srs_api.h" 2583 2584 2584 2585 typedef void OSRSpatialReferenceShadow; … … 3062 3063 } 3063 3064 SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){ 3064 return (OSRSpatialReferenceShadow*) OGR_L_GetSpatialRef(self); 3065 OGRSpatialReferenceH ref = OGR_L_GetSpatialRef(self); 3066 if( ref ) 3067 OSRReference(ref); 3068 return (OSRSpatialReferenceShadow*) ref; 3065 3069 } 3066 3070 SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){ … … 3536 3540 } 3537 3541 SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){ 3538 return (OSRSpatialReferenceShadow*)OGR_G_GetSpatialReference(self); 3542 OGRSpatialReferenceH ref = OGR_G_GetSpatialReference(self); 3543 if( ref ) 3544 OSRReference(ref); 3545 return (OSRSpatialReferenceShadow*) ref; 3539 3546 } 3540 3547 SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){ … … 5737 5744 } 5738 5745 } 5739 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, 0| 0 );5746 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 ); 5740 5747 return resultobj; 5741 5748 fail: … … 10743 10750 } 10744 10751 } 10745 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, 0| 0 );10752 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 ); 10746 10753 return resultobj; 10747 10754 fail:
