diff options
| author | Justin Bronn <jbronn@gmail.com> | 2007-07-12 12:26:40 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2007-07-12 12:26:40 +0000 |
| commit | 8162e3543c6164edb21127bf2eaccaecda8d6385 (patch) | |
| tree | 0983aab6ab32a1e2bf229b990961f4e023e768d2 | |
| parent | abccccc09519a10b4a860d8ddb47d29c73d4abcc (diff) | |
gis: fixed OGR bug and removed unnecessary imports from GeoMixin.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@5661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/gis/db/models/mixin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/gis/db/models/mixin.py b/django/contrib/gis/db/models/mixin.py index 8077d3d743..2064c4d581 100644 --- a/django/contrib/gis/db/models/mixin.py +++ b/django/contrib/gis/db/models/mixin.py @@ -1,6 +1,6 @@ # GEOS Routines from warnings import warn -from django.contrib.gis.geos import GEOSGeometry, hex_to_wkt, centroid, area +from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.gdal import OGRGeometry, SpatialReference # Until model subclassing is a possibility, a mixin class is used to add @@ -17,7 +17,7 @@ class GeoMixin: def _get_GEOM_ogr(self, field, srid): "Returns an OGR Python object for the geometry." - return OGRGeometry(hex_to_wkt(getattr(self, field.attname)), + return OGRGeometry(getattr(self, field.attname).wkt, SpatialReference('EPSG:%d' % srid)) def _get_GEOM_srid(self, srid): |
