diff options
| author | Daniel Wiesmann <daniel.wiesmann@gmail.com> | 2015-10-28 12:05:22 +0000 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-10-28 15:27:19 +0100 |
| commit | 48548d1a473a40adeaf292b63857efdd00a034be (patch) | |
| tree | 8aea90c3617cabaa12fca4c141051ae8db7ceef2 /django/contrib | |
| parent | e5ab75d2fda8ef2617bc13074206e66c980ca51f (diff) | |
Refs #25588 -- Added the srid property to GDALRaster
Geometry objects have an srid property, so this addition makes the raster api
more similar to the geometries api.
Diffstat (limited to 'django/contrib')
| -rw-r--r-- | django/contrib/gis/gdal/raster/source.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/django/contrib/gis/gdal/raster/source.py b/django/contrib/gis/gdal/raster/source.py index 3b4eb183b1..0f3a3a2744 100644 --- a/django/contrib/gis/gdal/raster/source.py +++ b/django/contrib/gis/gdal/raster/source.py @@ -215,6 +215,20 @@ class GDALRaster(GDALBase): self._flush() @property + def srid(self): + """ + Shortcut to access the srid of this GDALRaster. + """ + return self.srs.srid + + @srid.setter + def srid(self, value): + """ + Shortcut to set this GDALRaster's srs from an srid. + """ + self.srs = value + + @property def geotransform(self): """ Returns the geotransform of the data source. |
