Package com.luciad.ogc.wcs.client
Class TLcdGeoTIFFWCSCoverageDecoder
java.lang.Object
com.luciad.ogc.wcs.client.ALcdWCSCoverageDecoder
com.luciad.ogc.wcs.client.TLcdGeoTIFFWCSCoverageDecoder
This is the default decoder for WCS GetCoverage responses that decodes GeoTIFF data as
ALcdBasicImage
.
It recognizes output formats "GeoTIFF", "GTIFF", "GeoTIFFINT16", "GeoTIFFFLOAT32" (case insensitive).- Since:
- 2015.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeCoverage
(String aOutputFormat) Checks whether or not this decoder can decode a GetCoverage response in the given output format.decodeCoverage
(String aOutputFormat, String aContentType, InputStream aContent, TLcdWCSGetCoverageRequest aRequest) Decodes a GetCoverage response as anILcdModel
.
-
Constructor Details
-
TLcdGeoTIFFWCSCoverageDecoder
public TLcdGeoTIFFWCSCoverageDecoder()
-
-
Method Details
-
canDecodeCoverage
Description copied from class:ALcdWCSCoverageDecoder
Checks whether or not this decoder can decode a GetCoverage response in the given output format. The check must be quick and may be optimistic: implementations must returntrue
when they probably can decode a response in the given output format. When they returnfalse
, they most definitely can't decode the given output format. 'true' has the semantics of 'probably', while 'false' really means 'no'. When this method returnstrue
, a subsequent invocation ofALcdWCSCoverageDecoder.decodeCoverage(java.lang.String, java.lang.String, java.io.InputStream, com.luciad.ogc.wcs.client.TLcdWCSGetCoverageRequest)
may yet throw anIOException
to indicate that this decoder couldn't decode the coverage response after all.- Specified by:
canDecodeCoverage
in classALcdWCSCoverageDecoder
- Parameters:
aOutputFormat
- the requested output format, nevernull
.- Returns:
true
if this decoder can probably decode a GetCoverage response in the given output format,false
when it most definitely can't.
-
decodeCoverage
public ILcdModel decodeCoverage(String aOutputFormat, String aContentType, InputStream aContent, TLcdWCSGetCoverageRequest aRequest) throws IOException Description copied from class:ALcdWCSCoverageDecoder
Decodes a GetCoverage response as anILcdModel
. The model must support the imaging API, which means that it should either contain an element which is or has anALcdImage
.An element is an
ALcdImage
if it is anALcdBasicImage
,ALcdMultilevelImage
,ALcdImageMosaic
orALcdMultilevelImageMosaic
.An element has an
ALcdImage
if it is anILcdDataObject
with anALcdImage
as geometry property, as defined by a data type with aTLcdHasGeometryAnnotation
in its data model.If the model has multiple elements, only the first one will be considered. If the element is or has a
ALcdMultilevelImageMosaic
, only the first level will be cosid- Specified by:
decodeCoverage
in classALcdWCSCoverageDecoder
- Parameters:
aOutputFormat
- the requested output format, nevernull
aContentType
- the content type (MIME type) of the GetCoverage response, possiblynull
aContent
- the GetCoverage response content as a stream, nevernull
aRequest
- the request, nevernull
- Returns:
- the decoded coverage response as a model which contains an
ALcdBasicImage
,ALcdMultilevelImage
,ALcdImageMosaic
orALcdMultilevelImageMosaic
- Throws:
IOException
- if this decoder couldn't decode the content
-