Changeset 909
- Timestamp:
- 10/13/07 12:49:55
- Files:
-
- PCL/trunk/PCL-Core/cartography/data/feature.py (modified) (1 diff)
- PCL/trunk/PCL-Core/cartography/data/interfaces.py (modified) (2 diffs)
- PCL/trunk/PCL-Core/cartography/data/memory.py (modified) (2 diffs)
- PCL/trunk/PCL-Core/cartography/data/postgis.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PCL/trunk/PCL-Core/cartography/data/feature.py
r908 r909 278 278 __geo_interface__ = property(_provideGeoInterface) 279 279 280 281 class FeatureCollectionProvider: 282 283 def _provideGeoInterface(self): 284 return { 285 'type': 'FeatureCollection', 286 'features': [f._geo_interface for f in self.iterfeatures()] 287 } 288 __geo_interface__ = property(_provideGeoInterface) 289 PCL/trunk/PCL-Core/cartography/data/interfaces.py
r544 r909 103 103 "(dict)") 104 104 bounds = Attribute("Bounding box of the feature (IBoundingBox)") 105 __geo_interface__ = Attribute('Provide the Python geo interface') 105 106 106 107 def info(): … … 120 121 121 122 featuretype = Attribute("The source's feature type") 123 __geo_interface__ = Attribute('Provide the Python geo interface') 122 124 123 125 def iterfeatures(filter): PCL/trunk/PCL-Core/cartography/data/memory.py
r573 r909 30 30 import sys 31 31 32 from cartography.data.feature import Feature 32 from cartography.data.feature import Feature, FeatureCollectionProvider 33 33 from cartography.geometry import BoundingBox 34 34 from cartography.data.interfaces import IFeatureStore, IFeatureSource … … 122 122 'bounds': b} 123 123 124 class MemoryFeatureSource :124 class MemoryFeatureSource(FeatureCollectionProvider): 125 125 126 126 """Implements IFeatureSource. PCL/trunk/PCL-Core/cartography/data/postgis.py
r744 r909 91 91 92 92 from cartography.data.feature import Feature, isgeometry, \ 93 PropertyTypeCollection 93 PropertyTypeCollection, FeatureCollectionProvider 94 94 from cartography.data.feature import BooleanProperty, IntegerProperty \ 95 95 , RealProperty, StringProperty, GeometryProperty, ArrayProperty … … 656 656 657 657 658 class PGFeatureSource :658 class PGFeatureSource(FeatureCollectionProvider): 659 659 660 660 """A read-only source for features of a single type from a store.
