[Mapserver-users] in pursuit of an HDF example

Frank Warmerdam warmerdam at pobox.com
Thu Aug 7 16:59:40 EDT 2003


Charlton Purvis wrote:
> Hi, folks:
> 
> Anybody have an example of a .map incorporating an HDF?  Are they
> treated the same as regular rasters?  I doubt it.  But I'm not having
> much luck w/ a file that looks like:
> 
> $ gdalinfo 030708.1032.n12.hdf
> Driver: HDF4Image/HDF4 Dataset
> Size is 969, 1558
> Coordinate System is `'
> Origin = (0.000000,0.000000)
> Pixel Size = (1.000000,1.000000)
> Corner Coordinates:
> Upper Left  (   0.0000000,   0.0000000) 
> Lower Left  (       0.000,    1558.000) 
> Upper Right (     969.000,       0.000) 
> Lower Right (     969.000,    1558.000) 
> Center      (     484.500,     779.000) 
> Band 1 Block=969x1 Type=Byte, ColorInterp=Gray
> 
> I've tried a barebones .map w/ extents to match the corner coordinates
> listed above, but no dice.
> 
> Unfortunately, I don't know enough about HDF to be dangerous, but does
> MapServer (or GDAL) pull out georeferencing from the HDF and make a .wld
> moot?  Or do I still need to create a .wld per HDF?  Haven't I also
> heard that HDF's are capable of containing multiple rasters?

Charlton,

In most cases the HDF driver is not able to work out the georeferencing,
and that would appear to be the case here where only the default georeferencing
is being shown.  I also think that the HDF driver ignores .wld files, but I
believe MapServer will override the georeferencing with the contents of a
.wld file if GDAL doesn't have anything. So you should be able to use a
.wld file with it if *you* know the correct georeferenced area for the file.

By the way, the author of the HDF driver (who knows more about this than I)
is Andrey Kiselev.  He is on the gdal-dev list, but I don't think he is on
this list.

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    | Geospatial Programmer for Rent





More information about the mapserver-users mailing list