Django

Code

Changeset 5755

Show
Ignore:
Timestamp:
07/24/07 18:53:35 (1 year ago)
Author:
jbronn
Message:

gis: fixed utils bugs related to gdal module name changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis/django/contrib/gis/utils/inspect_data.py

    r5605 r5755  
    44""" 
    55 
    6 from django.contrib.gis.gdal.OGRGeometry import GEO_CLASSES 
     6from django.contrib.gis.gdal.geometries import GEO_CLASSES 
    77 
    88def sample(data_source, num_features=10, gcs_file=None): 
  • django/branches/gis/django/contrib/gis/utils/LayerMapping.py

    r5742 r5755  
    8282 LayerMapping just transformed the three geometries from the SHP file from their 
    8383   source spatial reference system (WGS84) to the spatial reference system of 
    84    the GeoDjango model (NAD83).  Further, data is selectively imported from 
    85    the given  
     84   the GeoDjango model (NAD83).  If no spatial reference system is defined for 
     85   the layer, use the `source_srs` keyword with a SpatialReference object to 
     86   specify one. Further, data is selectively imported from the given data source  
     87   fields into the model fields. 
    8688""" 
    8789from types import StringType, TupleType 
     
    8991from django.contrib.gis.gdal import \ 
    9092     OGRGeometry, OGRGeomType, SpatialReference, CoordTransform, \ 
    91      DataSource, Layer, Feature, OGRException 
    92 from django.contrib.gis.gdal.Field import Field, OFTInteger, OFTReal, OFTString, OFTDateTime 
     93     DataSource, OGRException 
     94from django.contrib.gis.gdal.field import Field, OFTInteger, OFTReal, OFTString, OFTDateTime 
    9395from django.contrib.gis.models import GeometryColumns, SpatialRefSys 
    94  
    9596from django.db import connection, transaction 
    9697from django.core.exceptions import ObjectDoesNotExist 
     
    258259            geo_col = GeometryColumns.objects.get(f_table_name=self.model._meta.db_table) 
    259260        except: 
    260             raise Exception, 'Geometry column "%s" does not exist. (did you run syncdb?)' 
     261            raise Exception, 'Geometry column does not exist. (did you run syncdb?)' 
    261262         
    262263        # Getting the coordinate system needed for transformation (with CoordTransform)   
     
    337338                except Exception, e: 
    338339                    print "Failed to save %s\n  Continuing" % kwargs 
    339                  
     340