[gdal-dev] Reading a NetCDF file with python (not recognised as a supported dataset name

Etienne Tourigny etourigny.dev at gmail.com
Tue Jun 12 04:48:19 PDT 2012


* Perhaps * there is a conflict/mismatch between osgeo4w and Tamas's install?

As far as I know both packages include netcdf...

I have no idea, sorry...

Etienne

On Tue, Jun 12, 2012 at 4:16 AM, Rutger <kassies at gmail.com> wrote:
> Hey,
>
>
> Etienne Tourigny-3 wrote
>>
>> did you install the gdal-python package? Your gdal python is probably
>> referencing an older gdal build which does not include netcdf support.
>>
>> There most probably is something wrong with your installation, because
>> I can read both files fine in osgeo4w with gdal-1.9.1 - 32 bits
>>
>> By any chance, are you running a 64-bit windows?
>>
>
> I have tried it now on three different machines.
> 1. XP Win32, Python 2.7.3, GDAL 1.9.1
> 2. XP Win32, Python 2.7.2, GDAL 1.9.1
> 3. XP Win64, Python 2.7.3, GDAL 1.9.0
>
> All installations are made with the builds from Tamas, i installed both the
> 'GDAL core' and the Python bindings, for example:
> GDAL-1.9.0.win32-py2.7.msi
> gdal-19-1500-core.msi
>
> For the first machine i tried it both in the OSGeo4W shell and the standard
> Python command line. The result is always like this:
> /Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
> on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import gdal
>>>> print('gdal version:'+gdal.VersionInfo())
> gdal version:1910
>>>> driver = gdal.GetDriverByName('netCDF')
>>>> print driver
> None
>>>> driver = gdal.GetDriverByName('GTiff')
>>>> print driver
> <osgeo.gdal.Driver; proxy of <Swig Object of type 'GDALDriverShadow *' at
> 0x00D68140> >
>>>>/
>
> Im certainly using a recent gdal build, and as mentioned the command line
> utilities have the netCDF driver correctly working. Ideed something is
> probably wrong with my setup,
> It would be interesting if anyone else using the Windows builds from Tamas
> can give the above commands a try.
> I always pick the name of the driver from the 'code' column on the GDAL
> formats page, i assume this is the right way to do.
>
>
> Regards,
> Rutger
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Reading-a-NetCDF-file-with-python-not-recognised-as-a-supported-dataset-name-tp4979943p4980653.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list