[Gdal-dev] Python and GDAL drivers
Frank Warmerdam
warmerdam at pobox.com
Thu May 18 15:47:44 EDT 2006
Ivan Lucena wrote:
> Hi there,
>
> Is there any reason for not getting the same list of drivers from the
> python extension as from the API or gdalinfo?
>
>>From Python I got 50 drivers:
>
>> import gdal
>> gdal.AllRegister()
>> for i in range(1, gdal.GetDriverCount()):
> ... drv = gdal.GetDriver(i)
> ... drv.GetDescription()
> 'GTiff'
> 'NITF'
> ...
>
>>From gdalInfo I got 53:
>
>> gdalinfo --formats
> VRT (rw+): Virtual Raster
> GTiff (rw+): GeoTIFF
> NITF (rw+): National Imagery Transmission Format
> ...
>
> I also got the 53s when accessing GDAL through the API.
>
> So "RST" for example, is not available through python:
>
>> ds = gdal.Open('....rst')
>> print ds
> None
>
> Do I need to re-run the swig wrappers? How?
>
> Thanks in advance,
Ivan,
You should not need to rerun swig wrapping as far as I know.
I suspect there is an old GDAL library getting picked up by
the python bindings. My understanding is that python uses
different shared library / dll search conventions than conventional
applications - at least in some cases.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF, http://osgeo.org
More information about the Gdal-dev
mailing list