Django

Code

Ticket #7705 (closed: fixed)

Opened 5 months ago

Last modified 5 months ago

GDAL datasource bug

Reported by: denis@poly9.com Assigned to: jbronn
Milestone: Component: GIS
Version: gis Keywords: gdal datasource
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by jbronn)

When I did this:

from django.contrib.gis.gdal import DataSource
ds = DataSource(fn)
for layer in ds:
 for item in layer:
  print item.geom, item.fields

I got that:

  File "../basescript.py", line 24, in importInteractiveLayer
    print item.geom, item.fields
  File "/usr/lib/python2.5/site-packages/django/contrib/gis/gdal/feature.py", line 87, in fields
    for i in xrange(self.num_fields)]
NameError: global name 'get_field_name' is not defined

I'm using gdal 1.5.1 and geodjango revision 7870

Attachments

Change History

07/10/08 08:34:48 changed by Karen Tracey <kmtracey@gmail.com>

  • needs_better_patch changed.
  • version changed from SVN to gis.
  • needs_tests changed.
  • needs_docs changed.

07/10/08 14:24:32 changed by jbronn

  • keywords set to gdal datasource.
  • owner changed from nobody to jbronn.
  • component changed from Uncategorized to GIS.
  • description changed.

07/10/08 14:30:16 changed by jbronn

  • status changed from new to assigned.

Yup, this is a bug caused by forgetting to import a ctypes prototype function. This will be fixed soon.

07/10/08 15:34:00 changed by jbronn

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [7880]) gis: Fixed #7705; forgot to import get_field_name from the ctypes prototypes. Thanks, Denis.


Add/Change #7705 (GDAL datasource bug)




Change Properties
Action