Author: jbronn
Date: 2007-07-12 07:26:40 -0500 (Thu, 12 Jul 2007)
New Revision: 5661
Modified:
django/branches/gis/django/contrib/gis/db/models/mixin.py
Log:
gis: fixed OGR bug and removed unnecessary imports from GeoMixin.
Modified: django/branches/gis/django/contrib/gis/db/models/mixin.py
===================================================================
--- django/branches/gis/django/contrib/gis/db/models/mixin.py 2007-07-12
11:27:38 UTC (rev 5660)
+++ django/branches/gis/django/contrib/gis/db/models/mixin.py 2007-07-12
12:26:40 UTC (rev 5661)
@@ -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 @@
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):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---