Changeset 1088
- Timestamp:
- 04/27/08 22:04:50
- Files:
-
- Shapely/trunk/shapely/geometry/point.py (modified) (3 diffs)
- Shapely/trunk/shapely/geometry/proxy.py (added)
- Shapely/trunk/shapely/predicates.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Shapely/trunk/shapely/geometry/point.py
r1082 r1088 11 11 from shapely.geometry.base import BaseGeometry, CoordinateSequence 12 12 from shapely.geometry.base import exceptNull 13 from shapely.geometry.proxy import CachingGeometryProxy 13 14 14 15 … … 200 201 201 202 202 class PointAdapter( Point):203 class PointAdapter(CachingGeometryProxy, Point): 203 204 204 205 """Adapts a Python coordinate pair or a numpy array to the point interface. 205 206 """ 206 207 207 context = None208 __geom__ = None209 208 _owned = False 210 209 211 210 def __init__(self, context): 212 211 self.context = context 212 self.factory = geos_point_from_py 213 213 214 214 @property … … 224 224 return len(self.context) 225 225 226 @property227 def _geom(self):228 """Keeps the GEOS geometry in synch with the context."""229 if self.__geom__ is not None:230 lgeos.GEOSGeom_destroy(self.__geom__)231 self.__geom__, n = geos_point_from_py(self.context)232 return self.__geom__226 # @property 227 # def _geom(self): 228 # """Keeps the GEOS geometry in synch with the context.""" 229 # if self.__geom__ is not None: 230 # lgeos.GEOSGeom_destroy(self.__geom__) 231 # self.__geom__, n = geos_point_from_py(self.context) 232 # return self.__geom__ 233 233 234 234 # TODO: reimplement x, y, z properties without calling invoking _geom Shapely/trunk/shapely/predicates.py
r1082 r1088 31 31 if self.context._geom is None or other._geom is None: 32 32 raise ValueError, "Null geometry supports no operations" 33 elif self.context == other:34 return self.self_predicate_value33 #elif self.context == other: 34 # return self.self_predicate_value 35 35 return bool(self.fn(self.context._geom, other._geom)) 36 36
