1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

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
This commit is contained in:
Justin Bronn 2007-07-12 12:26:40 +00:00
parent abccccc095
commit 8162e3543c

View File

@ -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):