[gdal-dev] ``HDF4Image: Can't get the list of geolocation maps in swath mod07''

Ivan Shmakov ivan at theory.asu.ru
Tue Dec 11 03:52:01 EST 2007


$ nl -ba gdal/frmts/hdf4/hdf4imagedataset.cpp 
...
  1641	    papszGeolocations = CSLTokenizeString2( pszGeoList, ",",
  1642	                                            CSLT_HONOURSTRINGS );
  1643	    // Read geolocation data
  1644	    nDimMaps = SWnentries( hSW, HDFE_NENTMAP, &nStrBufSize );

	Shouldn't there `HDFE_NENTGFLD' be used instead?

  1645	    pszDimMaps = (char *)CPLMalloc( nStrBufSize + 1 );
  1646	    paiOffset = (int32 *)CPLMalloc( nDimMaps * sizeof(int32) );
  1647	    memset( paiOffset, 0, nDimMaps * sizeof(int32) );
  1648	    paiIncrement = (int32 *)CPLMalloc( nDimMaps * sizeof(int32) );
  1649	    memset( paiIncrement, 0, nDimMaps * sizeof(int32) );
...
$ 

	Perhaps, it causes the following:

$ CPL_DEBUG=ON GEOL_AS_GCPS=FULL \
      gdal_translate \
          'HDF4_EOS:EOS_SWATH:"MOD07_L2.hdf":mod07:Tropopause_Height' \
          mod07-l2.tropopause-height.tiff 
...
HDF4Image: Can't get the list of geolocation maps in swath mod07
...
$ 

	(Of course, both `Latitude' and `Longitude' fields are there.)


More information about the gdal-dev mailing list