public class DimapProductHelpers extends Object
Constructor and Description |
---|
DimapProductHelpers() |
Modifier and Type | Method and Description |
---|---|
static String |
convertBeamUnitToDimapUnit(String unit)
Converts a given BEAM
unit into a DIMAP conform unit. |
static String |
convertDimapUnitToBeamUnit(String unit)
Converts a given DIMAP
unit into a BEAM conform unit. |
static Color |
createColor(org.jdom.Element colorElem) |
static FileFilter |
createDimapFileFilter()
Creates a
FileFilter for BEAM-DIMAP files. |
static org.jdom.Document |
createDom(InputStream inputStream)
Creates a parsed
Document from the given inputStream . |
static GeoCoding[] |
createGeoCoding(org.jdom.Document dom,
Product product) |
static Product |
createProduct(org.jdom.Document dom)
Creates a in-memory data product represenation from the given DOM (BEAM-DIMAP format).
|
static Map<Band,File> |
getBandDataFiles(org.jdom.Document dom,
Product product,
File inputDir)
Extract a
String object from the given dom which points to the data for the band with the given
name. |
static org.opengis.referencing.crs.CoordinateReferenceSystem |
getCRS(org.jdom.Document dom) |
static String |
getTiePointDataFile(org.jdom.Document dom,
String tiePointGridName)
Extract a
String object from the given dom which points to the data for the tie point grid with the
given name. |
static int |
getTiePointDataType(org.jdom.Element rootElement,
String tiePointGridName) |
static void |
printColorTag(int indent,
Color color,
XmlWriter pw) |
static void |
printColorTag(int indent,
String tag,
Color color,
XmlWriter pw) |
public static Product createProduct(org.jdom.Document dom)
dom
- the DOM in BEAM-DIMAP formatpublic static Map<Band,File> getBandDataFiles(org.jdom.Document dom, Product product, File inputDir) throws IllegalArgumentException
String
object from the given dom which points to the data for the band with the given
name.dom
- the JDOM in BEAM-DIMAP formatproduct
- the product to retrieve the data files forinputDir
- the directory where to search for the data filesMap
object which contains all the band data references from the given jDom.Map
if the jDom does not contain band data filesIllegalArgumentException
- if one of the parameters is null.public static String getTiePointDataFile(org.jdom.Document dom, String tiePointGridName) throws IllegalArgumentException
String
object from the given dom which points to the data for the tie point grid with the
given name.dom
- the DOM in BEAM-DIMAP formattiePointGridName
- the name of the tie point gridString
object which points to the data for the tie point grid.IllegalArgumentException
- if the parameter dom is null or the parameter tiePointGridName is null or emptypublic static Color createColor(org.jdom.Element colorElem)
public static int getTiePointDataType(org.jdom.Element rootElement, String tiePointGridName)
public static FileFilter createDimapFileFilter()
FileFilter
for BEAM-DIMAP files.JFileChooser
public static org.jdom.Document createDom(InputStream inputStream)
Document
from the given inputStream
.inputStream
- the stream to be parsedpublic static String convertBeamUnitToDimapUnit(String unit)
unit
into a DIMAP conform unit.unit
- a BEAM unitconvertDimapUnitToBeamUnit(String)
public static String convertDimapUnitToBeamUnit(String unit)
unit
into a BEAM conform unit.unit
- a DIMAP unitconvertBeamUnitToDimapUnit(String)
public static org.opengis.referencing.crs.CoordinateReferenceSystem getCRS(org.jdom.Document dom)
Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.