[gdal-dev] GetProjectionRef() returning NULL

Rodolfo Bonnin rodolfobonnin at suremptec.com.ar
Mon May 9 10:37:38 EDT 2011


Hello all,

I'm working with a HDF5 dataset with Gdal 1.8.0, I open it with the
HDF5Image driver.
The image metadata is read OK from what I can see, but when I want to
execute the GetProjectionRef() method, it returns null, even if the
documentation says it wouldn't return any null pointer.

I've traced the null pointer to HDF5ImageDataset::CreateProjections(),
in line 562 it reads

_______________________________________________________________________
poH5Objects=HDF5FindDatasetObjects( poH5RootGroup,  "Latitude" );
    if( !poH5Objects ) {
	return CE_None;
    }
_______________________________________________________________________

Since my HDF5 file doesn't have a "Latitude" dataset, the function
returns without setting the pszProjection variable, it remains null
and   is never being set as an empty string, as the GetProjectionRef
consist only in:
________________________________________________________________________
const char *HDF5ImageDataset::GetProjectionRef( )

{
    return pszProjection;  //
}
_______________________________________________________________________

BTW, I used an unofficial CMake configuration file to build the
library, but in this case it seems the fault can't be blamed to the
build scripts.

Many thanks in advance.

-- 
Ing. Rodolfo Bonnin
SUR Emprendimientos Tecnológicos

Perú 345  Piso 5to Oficina "B" (C1067AAG)
Ciudad de Buenos Aires, Argentina
Tel. +54 (11) 4342-2976/84
rodolfobonnin at suremptec.com.ar
www.suremptec.com


More information about the gdal-dev mailing list