Package com.luciad.ogc.wcs
Interface ILcdWCSModelEncoderFactory
public interface ILcdWCSModelEncoderFactory
A factory for model encoders to be used by WCS.
The WCS framework addresses the following concerns:
- Clip the input model to the output bounds.
- Transform the input model's image to the output reference.
-
Convert models containing legacy
ILcdRaster
elements to models containingALcdImage
elements. -
Pick the most appropriate level from an
ALcdMultilevelImage
orALcdMultilevelImageMosaic
based on output resolution, and fall back to less detailed levels in case of missing tiles or no-data-values. -
Composite multiple
ALcdImage
elements into a singleALcdBasicImage
.
-
The WCS framework calls
ILcdModelEncoder.export(ILcdModel, String)
with a model that has a singleALcdBasicImage
. Model encoders created by this factory should be able to export such a model. They do not need to be able to export models that haveALcdMultilevelImage
,ALcdImageMosaic
orALcdMultilevelImageMosaic
, but they may. -
The WCS framework never calls
ILcdModelEncoder.canSave(ILcdModel)
norILcdModelEncoder.save(ILcdModel)
. Model encoder implementations may safely throwUnsupportedOperationException
s for those methods. -
ILcdModelEncoder.canExport(ILcdModel, String)
is an optimistic check that has the semantics of a 'maybe'. It is a quick check to see if it's worthwhile to try and export a model. Implementations should returnfalse
if they cannot export a model, but they may returntrue
in case of doubt. The actualILcdModelEncoder.export(ILcdModel, String)
may then still throw anIllegalArgumentException
to indicate that the model could not be exported after all. -
An
ALcdBasicImage
may have an arbitrary number of bands of a variety of data types, seeALcdBandSemantics.DataType
. Implementations may have limits to what is allowed here, and should throwIllegalArgumentException
when they can't export a model. -
The default implementation used for WCS is
TLcdGeoTIFFModelEncoder
. The produced TIFFs are tiled by default, which is generally preferred for performance reasons. To enhance the interoperability with clients that do not support tiled TIFFs, this can be changed through the parameterwcs.outputFormat.geotiff.enableTiling
available in the the deployment descriptorweb.xml
file.
If your model encoder implements ILcdWCSModelEncoder
, the WCS framework will, for backwards compatibility,
not perform any of the aforementioned processing such as clipping, transforming and converting.
Instead, it will pass the input model directly to ILcdModelEncoder.export(ILcdModel, String)
.
The implementation is then entirely responsible for clipping, transforming and converting.
-
Method Summary
Modifier and TypeMethodDescriptioncreateModelEncoder
(ILcdModel aModel, ILcdOutputStreamFactory aOutputStreamFactory, String aOutputFormat, TLcdWCSRequestContext aRequestContext) Returns a model encoder that can write the given model to an output stream provided by the given factory, in the given format.
-
Method Details
-
createModelEncoder
ILcdModelEncoder createModelEncoder(ILcdModel aModel, ILcdOutputStreamFactory aOutputStreamFactory, String aOutputFormat, TLcdWCSRequestContext aRequestContext) Returns a model encoder that can write the given model to an output stream provided by the given factory, in the given format.- Parameters:
aModel
- AnILcdModel
.aOutputStreamFactory
- AnILcdOutputStreamFactory
.aOutputFormat
- A string describing the requested output format, e.g. "GeoTIFF".aRequestContext
- Context information regarding the WCS request being handled.- Returns:
- An
ILcdModelEncoder
.
-