Andrea Aime wrote on 07/09/2007 02:37:54 AM:
> Daniele Romagnoli ha scritto: > > HDF is a very complex format and different sub-formats use very > > different data structures. Build a Universal/very-generic HDF plugin > > (not product-specific) is not a so easy task, especially when available > > libraries have some limitations :) > > Don't worry. Yet, I guess there are "flavours" that are more common than > others, right? That is, in all this generality, there should be some > patterns, some tipical usage of the format which is more likely to > encounter. Daniele, HDF is a generic binary transport format which is wide open. It's kind of like saying "I'm making an XML format plugin" : you get the idea that there are tags and know some of the basic file-formatting rules, but there's no guarantees about which tags contain which vital parameters. :) Our MODIS stuff reads and writes the MODIS files written by our direct broadcast station--a slightly different flavor than the data delivered by NASA. Meghan may have made it handle the NASA version too. Worse, one HDF file may have more than geospatial dataset. It may have a set of point data _and_ a raster dataset. It's quite a versatile format. The problem is, the format is more versatile than the I/O plugin interface inside GeoTools. So...my suggestion is: leave the generic bits "abstract". In essence, you'll be designing an "HDF file plugin interface". You may then implement the HDF interface with "MODIS L1B Direct Broadcast Format", "MODIS Fire Direct Broadcast Format", "MODIS L1B NASA Format", .... etc. Each of these plugins knows how to assemble all the "geospatial pieces" in the file into something GeoTools will understand. Yet they all leverage the "generic stuff" needed by all HDF plugins (file opening, etc.) Good candidates for generic utility code: 1] An adapter to represent a 2d SDS as a GridCoverage 2] 3D SDS -> (Name of 3D GridCoverage, escapes me right now) 3] An adapter to represent the contents of a VTable as a FeatureCollection. 4] An adapter to represent "parallel arrays" in HDF "Attributes" as a FeatureCollection. Bryce ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
