Changeset 5586
- Timestamp:
- 07/02/07 10:45:46 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis/django/contrib/gis/gdal/Field.py
r5478 r5586 26 26 def __str__(self): 27 27 "Returns the string representation of the Field." 28 return '%s (%s)' % (self.name, self. __class__.__name__)28 return '%s (%s)' % (self.name, self.value) 29 29 30 30 #### Field Properties #### django/branches/gis/django/contrib/gis/utils/LayerMapping.py
r5529 r5586 159 159 gtype = geom.geom_type 160 160 gname = geom.geom_name 161 161 162 162 if make_multi(gname, model_type): 163 163 # Do we have to 'upsample' into a Geometry Collection? … … 167 167 pass 168 168 else: 169 raise Exception, 'Invalid mapping geometry !'169 raise Exception, 'Invalid mapping geometry; model has %s, feature has %s' % (model_type, gtype) 170 170 171 171 ## Handling other fields … … 238 238 ## Getting the OGR geometry from the field 239 239 geom = feat.geom 240 240 241 241 if make_multi(geom.geom_name, model_type): 242 242 # Constructing a multi-geometry type to contain the single geometry 243 multi_type = multi_types[g name]243 multi_type = multi_types[geom.geom_name] 244 244 g = OGRGeometry(multi_type) 245 245 g.add(geom)
