[gdal-dev] python bindings: strange behavior with layer
Python Gis
pygis2010 at yahoo.com
Tue Jul 20 13:51:32 EDT 2010
Hi
this is my code:
from osgeo import ogr
def OpenLayer(shape_path, shape_name):
drv_shp = ogr.GetDriverByName('ESRI Shapefile')
shp_ds = drv_shp.Open(shape_path, 1)
layer = shp_ds.GetLayerByName(shape_name)
print 'Name from method: %s' % layer.GetName()
return layer;
layer = OpenLayer('output', 'myshapefile')
print 'Name from main: %s' % layer.GetName()
and this is the output:
$ python testogr.py
Name from method: firenews
Segmentation fault
what can it be?
thanks a lot
More information about the gdal-dev
mailing list