Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic SeaDAS / Non-SeaDAS Packages (e.g. MATLAB, ENVI, GIS, etc) / R "free software for statistical computing and graphics" and SeaDAS (locked) (1581 hits)
By WhiteG Date 2012-04-13 15:17 Edited 2012-04-16 13:14
In the past, our group has used the hdfgroup's h4toh5 converter to produce hdf5 files and then loaded those using the hdf5 library in R.   This has not been a robust approach, particularly for Windows XP users, and does not preserve map projections.  Recently, the hdfgroup made Windows 7 their "reference" platform and do not appear to have current binaries for Windows XP. This means R developers would need to produce their own hdf5 libraries in order to support XP.   Meanwhile, the rgdal library appears to be well maintained on Windows, and installs easily on linux or Mac OS X.   SeaDAS 6.x supports geotiff directly, but produces 8-bit RGB.   I have, however, found that rgdal can read geotiff's with 'float' values created using the following user band command gleaned from other postings to these forums:

; write tiff with 'float' data
fbuf=1
band_ix=GET_BANDIX(FBUF=fbuf)
SDP_NAV_BAND_GET, band_ix,map_info
MAKE_GEOTIFF, fbuf, B1, map_info, geo_tags
RESULT=-1.0*B1 ;; convert to float
WRITE_TIFF, 'float.tif', RESULT, GEOTIFF=geo_tags, /FLOAT

The WRITE_TIFF procedure is part of SeaDAS and only supports the cylindrical equidistant projection.   There are some examples on the web of the geo_tags structure for other projections, but because IDL has a proprietary projection library this may not always be a simple task.  Another route to get the geo_tags structure is to create a geotiff with the projection you want using your external application, then have someone with an IDL license dump the structure for you and try to construct a matching projection in IDL.

Time will tell if this a more robust approach than relying on h4toh5 and hdf5 readers.
Previous Next Up Topic SeaDAS / Non-SeaDAS Packages (e.g. MATLAB, ENVI, GIS, etc) / R "free software for statistical computing and graphics" and SeaDAS (locked) (1581 hits)



Responsible NASA Official: Gene C. Feldman
Curator: OceanColor Webmaster
Authorized by: Gene C. Feldman
Updated: 27 November 2007
Privacy Policy and Important Notices NASA logo