[gdal-dev] driver.GetMetadataItem in Java

Ivan Lucena ivan.lucena at princeton-ma.us
Tue Sep 25 22:44:57 PDT 2012


Hi there,

Is there any particular reason why that this code in Java results nulls

Driver driver = gdal.GetDriver(1);
String a = driver.GetMetadataItem(gdalconstConstants.DCAP_CREATE);
String b = driver.GetMetadataItem(gdalconstConstants.DCAP_CREATECOPY);
System.out.println(a + " - " + b);

null - null

While it works well in C (like in gdalinfo for example) and python like here:

>>> from osgeo import gdal
>>> dr = gdal.GetDriver(1);
>>> dr.GetMetadataItem(gdal.DCAP_CREATE)
'YES'
>>> dr.GetMetadataItem(gdal.DCAP_CREATECOPY)
'YES'
>>> 

Regards,

Ivan


More information about the gdal-dev mailing list