Django

Code

Changeset 5661

Show
Ignore:
Timestamp:
07/12/07 07:26:40 (1 year ago)
Author:
jbronn
Message:

gis: fixed OGR bug and removed unnecessary imports from GeoMixin?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis/django/contrib/gis/db/models/mixin.py

    r5657 r5661  
    11# GEOS Routines 
    22from warnings import warn 
    3 from django.contrib.gis.geos import GEOSGeometry, hex_to_wkt, centroid, area 
     3from django.contrib.gis.geos import GEOSGeometry 
    44from django.contrib.gis.gdal import OGRGeometry, SpatialReference 
    55 
     
    1818    def _get_GEOM_ogr(self, field, srid): 
    1919        "Returns an OGR Python object for the geometry." 
    20         return OGRGeometry(hex_to_wkt(getattr(self, field.attname))
     20        return OGRGeometry(getattr(self, field.attname).wkt
    2121                           SpatialReference('EPSG:%d' % srid)) 
    2222