Class ALcdOGCWMSCommandDispatcherFactory
- Direct Known Subclasses:
ALcdOGCSLDWMSCommandDispatcherFactory
,TLcdOGCWMSCommandDispatcherFactory
Supported OGC WMS operations
The command dispatcher provides support for the OGC WMS operations:- GetCapabilities: provides information on what WMS method the servers supports as well as the data that is available.
- GetMap: returns a rendered image upon request.
- GetFeatureInfo: returns more details on underlying data for a specified location.
GetMap
SLD extension
such that a request can be executed using StyledLayerDescriptor
s.
The default allows to perform basic SLD requests. This can be extended as outlined below.
Before an extension of this factory class was needed.
The following StyledLayerDescriptor
operations can be supported.
- GetMap with extended SLD support: extensions allow to perform custom styling as requested by the client application and/or styling data from a remote WFS or WCS service.
- DescribeLayer: returns a description of the data within a WMS layer. This is typically needed when you want to perform custom styling defined from within the client application.
- GetLegend: ability to return a legend for the styling that is applied on WMS layers.
Factory methods to implement
This class provides sensible default settings for data formats supported within the Luciad product suite.
Required implementations are picked up through the TLcdServiceLoader
for the following interfaces:
ILcdModelDecoder
ILcdWMSGXYLayerFactory
ILcdSLDGXYLayerFactory
ILcdGXYLayerFactory
ILcdGXYViewEncoder
ILcdWMSGetFeatureInfoRequestEncoder
LcdService
).
The fact that available implementations for image formats and feature info formats are picked up automatically does not mean they become advertised in the capabilities automatically. The
WMS capabilities
object created using the ILcdWMSCapabilitiesProvider
determines the formats that are advertised to client applications.
On creation of the ILcdWMSCapabilitiesProvider
the provided TLcdWMSCommandDispatcherContext
allows
to retrieve the available implementations which then can either all be included or you can opt to filter on the
actual supported formats advertised.
The method
-
createWMSCapabilitiesProvider(jakarta.servlet.ServletConfig, com.luciad.wms.server.ILcdModelProvider, com.luciad.wms.server.TLcdWMSCommandDispatcherContext, com.luciad.wms.server.TLcdOGCWMSCommandDispatcher)
Note there is also a default factory implementation TLcdOGCWMSCommandDispatcherFactory
from
which you can start or extend from. It can help you to lower your implementation efforts .
Implement the ILcdWMSCapabilitiesProvider
to return the capabilities upon client requests.
The capabilities provider
allows returning up-to-date versions of the
capabilities without need for implementation of other supporting classes.
It also allows for more fine grained control on which layers should be available for which user.
Extended Styled Layer Descriptor support.
As of 2017.0 this factory allows creating a command dispatcher factory immediately supporting the Styled Layer Descriptors (SLD). There is no need anymore to extend from the classALcdOGCSLDWMSCommandDispatcherFactory
.
The latter class is deprecated.
Provide implementations for the following methods to add SLD support:
createRemoteOWSModelDecoderFactories(jakarta.servlet.ServletConfig)
: Implementing this method allows decoding data served by remote OGC services like WFS and/or WCS. Within SLD these are defined using user-defined layers. The default implementation returnsnull
, as user-defined layers are an optional feature for an SLD-enabled WMS.-
createSLDWMSGXYLayerFactories(jakarta.servlet.ServletConfig)
: This method allows to provide an array ofALcdSLDWMSGXYLayerFactory
instances. It must have an implementation in which at least oneALcdSLDWMSGXYLayerFactory
is created. -
createWMSGetLegendGraphicEncoders(jakarta.servlet.ServletConfig)
: This method allows to provide an array ofILcdWMSGetLegendGraphicRequestEncoder
instances, to add support for theGetLegendGraphic
request. The default implementation returnsnull
, as this is an optional request. -
createWMSDescribeLayerEncoders(jakarta.servlet.ServletConfig)
: This method allows to provide an array ofILcdWMSDescribeLayerRequestEncoder
instances, to add support for theDescribeLayer
request. The default implementation returnsnull
, as this is an optional request.
Performance for client applications using tiled requests
This factory uses a tile cache to improve the performance of subsequent Tiled WMS requests. This tile cache is not used for (regular) WMS requests. It is a two-tier cache that uses an in-memory buffer with a (non-persistent) disk overflow. The cache is configured as part of the servlet context, which means that it can be reused across multiple servlet instances when in the same process. It can be configured by using the following servlet context parameters (context-param in web.xml).- memory-cache-size: The memory tile cache size in MB. Default is 10% of the max heap size. Can be 0.
- disk-cache-size: The disk tile cache size in MB. Default is "memory-cache-size x 100". Can be 0.
- disk-cache-path: The disk tile cache path. Also supports paths starting with
"${java.io.tmpdir}"
or"${user.home}"
. Default is "${java.io.tmpdir}/ogc"
The tile cache can be disabled by setting both the memory-cache-size
and disk-cache-size
parameters to 0. By default, the tile cache is enabled.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureSettings
(jakarta.servlet.ServletConfig aServletConfig) This method applies a few configuration settings.Allows to provide a list of additional attribute names which must be taken into account when checking the validity of a view for reuse from the view pool.Allows to provide a list of additional parameter names which must be taken into account when checking the validity of a view for reuse from the view pool.protected ILcdGXYLayerFactory[]
createFallbackGXYLayerFactories
(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdGXYLayerFactory
objects that can be used to create a GXY layer without a specified style.protected ILcdGXYViewEncoder[]
createGXYViewEncoders
(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdGXYViewEncoder
objects to be used for sending information on a WMS map request.protected ILcdModelDecoderFactory[]
createModelDecoderFactories
(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdModelDecoderFactory
objects to createILcdModelDecoder
objects for models corresponding to anALcdWMSLayer
.protected ILcdModelProvider
createModelProvider
(ILcdModelDecoderFactory[] aModelDecoderFactories) Creates aILcdModelProvider
, which provides central access to all models.protected TLcdOGCWMSCommandDispatcher
createOGCWMSCommandDispatcherInstance
(jakarta.servlet.ServletConfig aServletConfig) Creates a new instance (or an extension) ofTLcdOGCWMSCommandDispatcher
to be initialized.protected void
createReferenceParsersSFCT
(jakarta.servlet.ServletConfig aServletConfig, List<ILcdXYWorldReferenceParser> aWorldReferenceParserListSFCT, List<String> aCRSCodeListToPublishSFCT) Creates reference parsers.protected ILcdRemoteOWSModelDecoderFactory[]
createRemoteOWSModelDecoderFactories
(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdRemoteOWSModelDecoderFactory
objects to createILcdRemoteOWSModelDecoder
objects for models corresponding to a user-defined layer.protected ILcdWMSSLDFeatureTypeStyleProvider
createSLDFeatureTypeStyleProvider
(jakarta.servlet.ServletConfig aServletConfig) Creates anILcdWMSSLDFeatureTypeStyleProvider
that can provide afeature type style
for a WMS layer.protected ILcdSLDGXYLayerFactory[]
createSLDGXYLayerFactories
(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdSLDGXYLayerFactory
objects that can be used to create a GXY layer, given an SLD style.protected ALcdSLDWMSGXYLayerFactory[]
createSLDWMSGXYLayerFactories
(jakarta.servlet.ServletConfig aServletConfig) Deprecated.protected ILcdWMSCapabilitiesDecoder
createWMSCapabilitiesDecoder
(jakarta.servlet.ServletConfig aServletConfig, ILcdModelProvider aModelProvider) Creates aILcdWMSCapabilitiesDecoder
.protected ILcdWMSCapabilitiesProvider
createWMSCapabilitiesProvider
(jakarta.servlet.ServletConfig aServletConfig, ILcdModelProvider aModelProvider, TLcdWMSCommandDispatcherContext aEncoderContext) Creates a WMS capabilities provider.protected ILcdWMSCapabilitiesUpdater
createWMSCapabilitiesUpdater
(jakarta.servlet.ServletConfig aServletConfig, TLcdOGCWMSCommandDispatcher aCommandDispatcher, ILcdWMSCapabilitiesDecoder aDecoder) Deprecated.Starting from version 2017.0, the preferred way of working is to use theILcdWMSCapabilitiesProvider
.createWMSCommandDispatcher
(jakarta.servlet.ServletConfig aServletConfig) Creates from the servlet configuration file theALcdWMSCommandDispatcher
.protected ILcdWMSDescribeLayerRequestEncoder[]
createWMSDescribeLayerEncoders
(jakarta.servlet.ServletConfig aServletConfig) Overwrite this method to createILcdWMSDescribeLayerRequestEncoder
objects to be used for sending information on a WMS describe layer request.protected ILcdWMSFeatureInfoRequestEncoder[]
createWMSFeatureInfoEncoders
(jakarta.servlet.ServletConfig aServletConfig) Overwrite this method to createILcdWMSFeatureInfoRequestEncoder
objects to be used for sending information on a WMS feature info request.protected ILcdWMSGetFeatureInfoRequestEncoder[]
createWMSGetFeatureInfoEncoders
(jakarta.servlet.ServletConfig aServletConfig) Overwrite this method to createILcdWMSGetFeatureInfoRequestEncoder
objects to be used for sending information on a WMS feature info request.protected ILcdWMSGetLegendGraphicRequestEncoder[]
createWMSGetLegendGraphicEncoders
(jakarta.servlet.ServletConfig aServletConfig) Overwrite this method to createILcdWMSGetLegendGraphicRequestEncoder
objects to be used for sending information on a WMS legend graphic request.protected ILcdWMSGXYLayerFactory[]
createWMSGXYLayerFactories
(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdWMSGXYLayerFactory
objects to createILcdGXYLayer
objects for models corresponding with all types of WMS layers (named and user-defined).protected TLcdWMSGXYViewFactory
createWMSGXYViewFactory
(jakarta.servlet.ServletConfig aServletConfig) Creates anTLcdWMSGXYViewFactory
that is used to create and configure views in the WMS to render requested maps.protected ILcdWMSOnlineResourceResolver
createWMSOnlineResourceResolver
(jakarta.servlet.ServletConfig aServletConfig) Creates anILcdWMSOnlineResourceResolver
that is used to retrieve the paths (typically URLs) to online resources defined by the WMS specification.
-
Constructor Details
-
ALcdOGCWMSCommandDispatcherFactory
public ALcdOGCWMSCommandDispatcherFactory()
-
-
Method Details
-
createWMSCommandDispatcher
public ALcdWMSCommandDispatcher createWMSCommandDispatcher(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Description copied from class:ALcdWMSCommandDispatcherFactory
Creates from the servlet configuration file theALcdWMSCommandDispatcher
.- Specified by:
createWMSCommandDispatcher
in classALcdWMSCommandDispatcherFactory
- Parameters:
aServletConfig
- the servlet configuration values.- Returns:
- a
ALcdWMSCommandDispatcher
from the servlet configuration. - Throws:
jakarta.servlet.ServletException
- if theALcdWMSCommandDispatcher
can not be created.
-
createAdditionalParameterListForViewPoolCacheKey
Allows to provide a list of additional parameter names which must be taken into account when checking the validity of a view for reuse from the view pool. The view pool caches views which have been configured for requests based on the layers, styles, crs, etc. This prevents having to always re-create views and their layers which may be expensive. The default method implementation returns an empty list. If you are using additional request parameters beyond the standardized WMS parameters and if they have an impact on the visualization you need to return them in this method.- Returns:
- the list of parameter names to be taken into account for the view pool caching.
- Since:
- 2020.1.25
-
createAdditionalAttributeListForViewPoolCacheKey
Allows to provide a list of additional attribute names which must be taken into account when checking the validity of a view for reuse from the view pool. The view pool caches views which have been configured for requests based on the layers, styles, crs, etc. This prevents having to always re-create views and their layers which may be expensive. The default method implementation returns an empty list. If you are using request attributes that have an impact on the visualization, you need to return them in this method.- Returns:
- the list of attributes names to be taken into account for the view pool caching.
- Since:
- 2023.1
-
createReferenceParsersSFCT
protected void createReferenceParsersSFCT(jakarta.servlet.ServletConfig aServletConfig, List<ILcdXYWorldReferenceParser> aWorldReferenceParserListSFCT, List<String> aCRSCodeListToPublishSFCT) throws jakarta.servlet.ServletException Creates reference parsers. The reference parsers to be registered within theWMS command dispatcher
should be added to the list as side effect of the method. Next to this the supported CRS codes should be added as well.This method registers by default the following parser implementations:
TLcdEPSGReferenceParser
: parser for EPSG codes.TLcdCRSReferenceParser
: parser for CRS:84 code.TLcdAUTOReferenceParser
: parser for AUTO codes.TLcdAUTO2ReferenceParser
: parser for AUTO2 codes.TLcdLuciadMapReferenceParser
: parser for properties based encoding of references.
The list of CRS codes is populated as follows. If nothing is specified within the web deployment descriptor via the
ServletConfig
a default list of CRS codes is used. The default list consists of codes that are widely used. If the following parameters are defined within the web deployment descriptor the CRS codes are read from file(s). You can use the following parameters which must point to a file that can be found on the class path.crs.epsg.cfg
: A file containing conversions of EPSG codes to Well-Known Text.crs.auto.cfg
: A list of supported AUTO projections.crs.auto2.cfg
: A list of supported AUTO2 projections.
- Parameters:
aServletConfig
- the servlet configuration parameters.aWorldReferenceParserListSFCT
- the list of reference parsers to be populated.aCRSCodeListToPublishSFCT
- the CRS codes that should be published in the WMS capabilities; to be populated.- Throws:
jakarta.servlet.ServletException
- Since:
- 2017.0
-
createWMSCapabilitiesDecoder
protected ILcdWMSCapabilitiesDecoder createWMSCapabilitiesDecoder(jakarta.servlet.ServletConfig aServletConfig, ILcdModelProvider aModelProvider) Creates aILcdWMSCapabilitiesDecoder
. The default implementation returns aTLcdWMSCapabilitiesXMLDecoder
.Note: It is highly recommended to make use of a
ILcdWMSCapabilitiesProvider
iso theILcdWMSCapabilitiesDecoder
. TheILcdWMSCapabilitiesProvider
allows to provide updated capabilities much easier. You do not need aILcdWMSCapabilitiesUpdater
anymore to update the capabilities. Within the implementation of theILcdWMSCapabilitiesProvider
you can still make use of a decoder that reads the configuration from file or another source.- Parameters:
aServletConfig
- the servlet configuration object containing initialization parameters.aModelProvider
- the model provider. Can be used to obtain bounds for published layers at runtime.- Returns:
- a decoder for the WMS capabilities configuration file.
- See Also:
-
createWMSCapabilitiesProvider
protected ILcdWMSCapabilitiesProvider createWMSCapabilitiesProvider(jakarta.servlet.ServletConfig aServletConfig, ILcdModelProvider aModelProvider, TLcdWMSCommandDispatcherContext aEncoderContext) throws jakarta.servlet.ServletException Creates a WMS capabilities provider. This is the main method to implement to control the data that is being served by the WMS.The default implementation returns
null
.As fall-back, and for backwards compatibility reasons, the command dispatcher factory will still create a
ILcdWMSCapabilitiesProvider
but based on theILcdWMSCapabilitiesDecoder
.- Parameters:
aServletConfig
- the servlet configuration parameters.aModelProvider
- the model provider. Can be used to obtain bounds for published layers at runtime.aEncoderContext
- context object containing the registered encoders for various WMS requests.- Returns:
- the WMS capabilities provider.
- Throws:
jakarta.servlet.ServletException
- when the WMS capabilities provider cannot be created.- Since:
- 2017.0
-
createOGCWMSCommandDispatcherInstance
protected TLcdOGCWMSCommandDispatcher createOGCWMSCommandDispatcherInstance(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Creates a new instance (or an extension) ofTLcdOGCWMSCommandDispatcher
to be initialized.This implementation includes internal data models for specific SLD extensions.
- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- a new instance (or an extension) of
TLcdOGCWMSCommandDispatcher
to be initialized. - Throws:
jakarta.servlet.ServletException
- if the instance can not be created for some reason.
-
createSLDWMSGXYLayerFactories
protected ALcdSLDWMSGXYLayerFactory[] createSLDWMSGXYLayerFactories(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Deprecated.Since 2017.0 Please overridecreateWMSGXYLayerFactories(ServletConfig)
.Creates
ALcdSLDWMSGXYLayerFactory
objects to createILcdGXYLayer
objects for models corresponding with all types of WMS layers (named and user-defined).This method is deprecated. It is recommended to override
createWMSGXYLayerFactories
as it accepts bothILcdWMSGXYLayerFactory
andALcdSLDWMSGXYLayerFactory
instances.By default, this method creates an empty array.
- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- factories to create
ILcdGXYLayer
objects. - Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createWMSGXYLayerFactories
protected ILcdWMSGXYLayerFactory[] createWMSGXYLayerFactories(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Creates
ILcdWMSGXYLayerFactory
objects to createILcdGXYLayer
objects for models corresponding with all types of WMS layers (named and user-defined). You can include alsoALcdSLDWMSGXYLayerFactory
instances. They are recognized in theTLcdOGCWMSCommandDispatcher
.By default, this method:
- Uses
TLcdServiceLoader
to find all registeredILcdWMSGXYLayerFactory
instances. You can use theLcdService
annotation to register additional WMS layer factories. If you do not want to use theTLcdServiceLoader
mechanism, you can override this method as well and return your own list of WMS layer factories. - Creates a new
ILcdWMSGXYLayerFactory
instance that is configured with the objects returned by the following methods:createSLDGXYLayerFactories
: Used to create a GXY layer, given an SLD style. This can for example be useful to plugin in layer factories using format-specific SLD extensions.createFallbackGXYLayerFactories
: Used to create a GXY layer without using the named style that is provided. This can be used to make sure there is always at least one layer factory available for painting, or to plug in format-specific layer factories that define their own styling.
Note on backward compatibility. This implementation first checks if the call to the method
createSLDWMSGXYLayerFactories()
return a non-empty array of layer factories. If it does, those are returned immediately to keep behavior as before using v2017.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- factories to create
ILcdGXYLayer
objects. - Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
- Uses
-
createSLDGXYLayerFactories
protected ILcdSLDGXYLayerFactory[] createSLDGXYLayerFactories(jakarta.servlet.ServletConfig aServletConfig) Creates
ILcdSLDGXYLayerFactory
objects that can be used to create a GXY layer, given an SLD style. This can for example be useful to plugin in layer factories using format-specific SLD extensions.This method is used in the default implementation of
createSLDWMSGXYLayerFactories(ServletConfig)
.By default, this method uses
TLcdServiceLoader
to find all registeredILcdSLDGXYLayerFactory
instances. You can use theLcdService
annotation to register additional layer factories. If you do not want to use theTLcdServiceLoader
mechanism, you can override this method as well and return your own list of SLD layer factories.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
ILcdSLDGXYLayerFactory
objects. the returned array can be empty, but nevernull
.- Since:
- 2017.0
-
createFallbackGXYLayerFactories
protected ILcdGXYLayerFactory[] createFallbackGXYLayerFactories(jakarta.servlet.ServletConfig aServletConfig) Creates
ILcdGXYLayerFactory
objects that can be used to create a GXY layer without a specified style. This can be used to make sure there is always at least one layer factory available for painting, or to plug in format-specific layer factories that define their own styling.This method is used in the default implementation of
createSLDWMSGXYLayerFactories(ServletConfig)
.By default, this method uses
TLcdServiceLoader
to find all registeredILcdGXYLayerFactory
instances. You can use theLcdService
annotation to register additional layer factories. If you do not want to use theTLcdServiceLoader
mechanism, you can override this method as well and return your own list of layer factories.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
ILcdGXYLayerFactory
objects. the returned array can be empty, buy nevernull
.- Since:
- 2017.0
-
configureSettings
protected void configureSettings(jakarta.servlet.ServletConfig aServletConfig) This method applies a few configuration settings. These settings are retrieved from a given settings file specified with the servlet initialization parameter settings.cfg or if not specified from a file with the same name. The default parameters that can be specified- JAI.tile.cache.size.mb: specifies the size of the cache JAI (Java Advanced Imaging) in MB.
- Parameters:
aServletConfig
- the servlet configuration parameters.
-
createModelDecoderFactories
protected ILcdModelDecoderFactory[] createModelDecoderFactories(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Creates
ILcdModelDecoderFactory
objects to createILcdModelDecoder
objects for models corresponding to anALcdWMSLayer
.By default, this method returns an array of size 1 that contains a
TLcdModelDecoderFactory
instance. This implementation usesTLcdServiceLoader
to findILcdModelDecoder
instances.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- factories to create
ILcdModelDecoder
objects. - Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createWMSFeatureInfoEncoders
protected ILcdWMSFeatureInfoRequestEncoder[] createWMSFeatureInfoEncoders(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Overwrite this method to createILcdWMSFeatureInfoRequestEncoder
objects to be used for sending information on a WMS feature info request. By default this method returns no feature info encoders. Note that there is a similar interface toILcdWMSFeatureInfoRequestEncoder
, namelyILcdWMSGetFeatureInfoRequestEncoder
, which is used for the same purpose but offers access to extra information related to the current request. The factory methodcreateWMSGetFeatureInfoEncoders(ServletConfig)
can be used to register implementations of this method. Registered objects of the typeILcdWMSGetFeatureInfoRequestEncoder
will have precedence above the objects of the typeILcdWMSFeatureInfoRequestEncoder
, if they have the same MIME type.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- feature info request encoders.
- Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createWMSGetFeatureInfoEncoders
protected ILcdWMSGetFeatureInfoRequestEncoder[] createWMSGetFeatureInfoEncoders(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Overwrite this method to createILcdWMSGetFeatureInfoRequestEncoder
objects to be used for sending information on a WMS feature info request. By default, this method usesTLcdServiceLoader
to find all registeredILcdWMSGetFeatureInfoRequestEncoder
instances. You can use theLcdService
annotation to register feature info request encoders. If you do not want to use theTLcdServiceLoader
mechanism, you can override this method as well and return your own list of feature info request encoders. Note that there is a similar interface toILcdWMSGetFeatureInfoRequestEncoder
, namelyILcdWMSFeatureInfoRequestEncoder
, which is used for the same purpose but doesn't provide access to information related to the current request. This information can be useful while encodingGetFeatureInfo
responses. Registered objects of the typeILcdWMSGetFeatureInfoRequestEncoder
will have precedence above the objects of the typeILcdWMSFeatureInfoRequestEncoder
, if they have the same MIME type.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- feature info request encoders.
- Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createGXYViewEncoders
protected ILcdGXYViewEncoder[] createGXYViewEncoders(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException CreatesILcdGXYViewEncoder
objects to be used for sending information on a WMS map request.This implementation uses
TLcdServiceLoader
to findILcdGXYViewEncoder
instances.As a minimum this implementation returns
ILcdGXYViewEncoder
instances for encoding a view as PNG and as JPEG.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- feature info request encoders.
- Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createWMSCapabilitiesUpdater
protected ILcdWMSCapabilitiesUpdater createWMSCapabilitiesUpdater(jakarta.servlet.ServletConfig aServletConfig, TLcdOGCWMSCommandDispatcher aCommandDispatcher, ILcdWMSCapabilitiesDecoder aDecoder) Deprecated.Starting from version 2017.0, the preferred way of working is to use theILcdWMSCapabilitiesProvider
.Creates aILcdWMSCapabilitiesUpdater
, which can be used to update the capabilities in the command dispatcher. By default this method returnsnull
, indicating that there is no capabilities updater active.- Parameters:
aServletConfig
- the servlet configuration parameters.aCommandDispatcher
- the command dispatcher.aDecoder
- the capabilities decoder.- Returns:
- a capabilities updater.
-
createModelProvider
Creates a
ILcdModelProvider
, which provides central access to all models. The command dispatcher uses this interface to retrieve a model, instead of directly using the model decoder factories. These model decoder factories should only be used by theILcdModelProvider
to decode the necessary models. This centralized access allows implementations to define additional functionality, like a cache mechanism.The default implementation returns a
ILcdModelProvider
that maintains The default implementation returns aILcdModelProvider
that maintains a cache for all decoded models. To prevent memory problems, it makes use of Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand. Soft references are most often used to implement memory-sensitive caches.The request context object type supplied to the
ILcdOGCModelProvider#getModel(String, ILcdRequestContext)
is of the typeTLcdWFSRequestContext
.By default, this method returns an
TLcdWMSModelProvider
instance- Parameters:
aModelDecoderFactories
- The model decoder factories that must be used by the model provider to decode models.- Returns:
- a model provider.
-
createWMSOnlineResourceResolver
protected ILcdWMSOnlineResourceResolver createWMSOnlineResourceResolver(jakarta.servlet.ServletConfig aServletConfig) Creates anILcdWMSOnlineResourceResolver
that is used to retrieve the paths (typically URLs) to online resources defined by the WMS specification. Examples are DTD or XML Schema references in a capabilities document or in a service exception report, or online resource elements in the Capabilities (e.g. MetadataURL). The default implementation returns anILcdWMSOnlineResourceResolver
that returns:- A local path for DTD/XML Schema references.
- For online resource elements defined in the capabilities, the path defined in
ALcdWMSCapabilities
, but resolved against the current servlet address if it is not absolute.
- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- a
ILcdWMSOnlineResourceResolver
that is used to retrieve the paths to online resources defined by the WMS specification.
-
createWMSGXYViewFactory
protected TLcdWMSGXYViewFactory createWMSGXYViewFactory(jakarta.servlet.ServletConfig aServletConfig) Creates anTLcdWMSGXYViewFactory
that is used to create and configure views in the WMS to render requested maps.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- an
TLcdWMSGXYViewFactory
that is used to create and configure views in the WMS to render requested maps.
-
createRemoteOWSModelDecoderFactories
protected ILcdRemoteOWSModelDecoderFactory[] createRemoteOWSModelDecoderFactories(jakarta.servlet.ServletConfig aServletConfig) CreatesILcdRemoteOWSModelDecoderFactory
objects to createILcdRemoteOWSModelDecoder
objects for models corresponding to a user-defined layer. By default this method returns no decoders.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- factories to create
ILcdRemoteOWSModelDecoder
objects. - See Also:
-
createSLDFeatureTypeStyleProvider
protected ILcdWMSSLDFeatureTypeStyleProvider createSLDFeatureTypeStyleProvider(jakarta.servlet.ServletConfig aServletConfig) Creates anILcdWMSSLDFeatureTypeStyleProvider
that can provide afeature type style
for a WMS layer.This provider is used to determine the desired SLD feature type style for a WMS layer if the request did not include one. By default,
null
is returned, indicating that the styling of the WMS layers is left to the registeredlayer factories
for requests without an SLD feature type style.- Since:
- 2022.0
- See Also:
-
createWMSGetLegendGraphicEncoders
protected ILcdWMSGetLegendGraphicRequestEncoder[] createWMSGetLegendGraphicEncoders(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Overwrite this method to createILcdWMSGetLegendGraphicRequestEncoder
objects to be used for sending information on a WMS legend graphic request. By default this method returns no legend graphic encoders.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- legend graphic request encoders.
- Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createWMSDescribeLayerEncoders
protected ILcdWMSDescribeLayerRequestEncoder[] createWMSDescribeLayerEncoders(jakarta.servlet.ServletConfig aServletConfig) throws jakarta.servlet.ServletException Overwrite this method to createILcdWMSDescribeLayerRequestEncoder
objects to be used for sending information on a WMS describe layer request. By default this method returns no describe layer encoders.- Parameters:
aServletConfig
- the servlet configuration parameters.- Returns:
- describe layer request encoders.
- Throws:
jakarta.servlet.ServletException
- if the factories can not be created for some reason.- See Also:
-
createWMSGXYLayerFactories(ServletConfig)
.