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
ILcdRasterelements to models containingALcdImageelements. -
Pick the most appropriate level from an
ALcdMultilevelImageorALcdMultilevelImageMosaicbased on output resolution, and fall back to less detailed levels in case of missing tiles or no-data-values. -
Composite multiple
ALcdImageelements 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,ALcdImageMosaicorALcdMultilevelImageMosaic, but they may. -
The WCS framework never calls
ILcdModelEncoder.canSave(ILcdModel)norILcdModelEncoder.save(ILcdModel). Model encoder implementations may safely throwUnsupportedOperationExceptions 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 returnfalseif they cannot export a model, but they may returntruein case of doubt. The actualILcdModelEncoder.export(ILcdModel, String)may then still throw anIllegalArgumentExceptionto indicate that the model could not be exported after all. -
An
ALcdBasicImagemay 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 throwIllegalArgumentExceptionwhen they can't export a model. -
The default implementation used for WCS includes support for GeoTFF, JPEG 2000, PNG and JPEG.
For GeoTIFF and JPEG 2000, the used encoders are respectively
TLcdGeoTIFFModelEncoder. andTLcdJPEG2000ModelEncoder. The produced TIFFs and JPEGs are tiled by default, which is generally preferred for performance reasons. To enhance the interoperability with clients that do not support tiled data, this can be changed through the parameterwcs.outputFormat.geotiff.enableTilingavailable in the the deployment descriptorweb.xmlfile. -
The WCS
GetCapabilitiesandDescribeCoverageresponses list the supported output formats aligned with the used WCS version. In case of WCS 1.x, the output formats are listed in theDescribeCoverageresponse. In case of WCS 2.0.1, the output formats are listed in theGetCapabilitiesresponse. When you plug in a customILcdWCSModelEncoderFactory, you can define the output formats to be listed for your implementation viagetSupportedOutputFormats(TLcdWCSRequestContext).
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.Returns the output formats for which this factory can produce model encoders.
-
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.
-
getSupportedOutputFormats
Returns the output formats for which this factory can produce model encoders.- Parameters:
aContext- context information regarding the WCS request being handled- Returns:
- the output formats for which this factory can produce model encoders.
- Since:
- 2025.0.03
-