the purpose of testing SplitImage application : http://www.orfeo-toolbox.org/CookBook/CookBooksu68.html#x95-2580005.1.10 is to test if your input is correctly handled by the image reader,
Cheers, Jonathan 2014-05-31 15:23 GMT+02:00 dcd <[email protected]>: > I'm not sure I quite understand: it is possible to "split" the original > HDF into separate files and then run otbcli_BandMath on each output. That > works fine, but I'm trying to operate directly on individual "bands" > (subdatasets in HDF parlance) without needing that intermediary step. > > Input.hdf has 17 subdatasets ("bands"), with "mask" being the name of the > 17th subdataset. > > *Is there a way to run otbcli_BandMath on a specific subdataset within a > HDF file without having to extract the subdataset first?* > > I've since discovered that I can do what I need using band math in GDAL by > referencing individual subdatasets within the HDF file, but I thought OTB > would work as well. > > Hopefully that's a bit clearer than mud this time :) > > Merci! > > > > On Saturday, May 31, 2014 5:57:16 AM UTC-4, Jonathan Guinet wrote: > >> Hi >> >> could it be possible to try a split image application with your HDF as >> input in order to investigate a mis understanding with multiband HDF ? >> >> >> cheers, >> >> Jonathan >> >> >> >> 2014-05-29 20:38 GMT+02:00 dcd <[email protected]>: >> >>> Hi all, >>> >>> I've been trying to use otbcli_BandMath with a HDF file with 17 >>> sub-datasets, but it appears I can only interact with the first band. On >>> that note, otbcli_ReadImageInfo only appears to acknowledge the existence >>> of a single band. Using gdalinfo, I am able correctly identifies all 17 >>> layers of the HDF file). I can extract each subdataset using >>> gdal_translate, and then use otbcli_BandMath, but I would prefer to stay >>> within OTB if at all possible. >>> >>> My questions: are HDF files with multiple subdatasets supported in >>> otbcli_BandMath? If so, what is the correct syntax for working with >>> subdatasets within a HDF file using otbcli_BandMath? >>> >>> I've tried the following: >>> >>> $ otbcli_BandMath -il input.hdf -out output.hdf -exp "im1b17+1" >>> >>> >>> and >>> >>> $ otbcli_BandMath -il HDF4_EOS:EOS_GRID:"input.hdf":Grid:mask -out >>> output.hdf -exp "im1b1+1" >>> >>> Neither of the above examples work, although the first example will if >>> set to "im1b1", but then this only works on the first subdataset within >>> the HDF file (i.e., "band 1") >>> >>> Cheers, >>> >>> PS-loving the new OTB 4...great work! >>> >>> Dennis >>> >>> -- >>> -- >>> Check the OTB FAQ at >>> http://www.orfeo-toolbox.org/FAQ.html >>> >>> You received this message because you are subscribed to the Google >>> Groups "otb-users" group. >>> To post to this group, send email to [email protected] >>> >>> To unsubscribe from this group, send email to >>> [email protected] >>> >>> For more options, visit this group at >>> http://groups.google.com/group/otb-users?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "otb-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > -- > Check the OTB FAQ at > http://www.orfeo-toolbox.org/FAQ.html > > You received this message because you are subscribed to the Google > Groups "otb-users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/otb-users?hl=en > --- > You received this message because you are subscribed to the Google Groups > "otb-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Check the OTB FAQ at http://www.orfeo-toolbox.org/FAQ.html You received this message because you are subscribed to the Google Groups "otb-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/otb-users?hl=en --- You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
