Package com.luciad.formats.wms
Class WmsModelDecoder
java.lang.Object
com.luciad.formats.wms.WmsModelDecoder
Creates an
IRasterModel
that connects to a WMS service.
See WmsModelDecoder#decode
for more details.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IRasterModel
decode
(WmsDataSource dataSource) Creates a WMS raster model, or returns information about why this model cannot be created.static IRasterModel
decode
(WmsDataSource dataSource, WmsCapabilities wmsCapabilities) Creates a WMS raster model, or returns information about why this model cannot be created.static IRasterModel
decode
(WmsDataSource dataSource, WmsModelDecoderOptions options) Creates a WMS raster model, or returns information about why this model cannot be created.static IRasterModel
decode
(WmsDataSource dataSource, WmsModelDecoderOptions options, WmsCapabilities wmsCapabilities) Creates a WMS raster model, or returns information about why this model cannot be created.
-
Method Details
-
decode
@NotNull public static IRasterModel decode(@NotNull WmsDataSource dataSource, @Nullable WmsCapabilities wmsCapabilities) throws IOException Creates a WMS raster model, or returns information about why this model cannot be created.- Parameters:
dataSource
- The structure describing the source to use for data retrieval.wmsCapabilities
- The source's capabilities. Can be retrieved before usingWmsCapabilities#getCapabilities
and reused. If set tonull
, it will be queried internally.- Returns:
- the model created for the WMS data source.
- Throws:
IOException
- when creation of the model fails.
-
decode
Creates a WMS raster model, or returns information about why this model cannot be created.- Parameters:
dataSource
- The structure describing the source to use for data retrieval.- Returns:
- the model created for the WMS data source.
- Throws:
IOException
- when creation of the model fails.
-
decode
@NotNull public static IRasterModel decode(@NotNull WmsDataSource dataSource, @NotNull WmsModelDecoderOptions options, @Nullable WmsCapabilities wmsCapabilities) throws IOException Creates a WMS raster model, or returns information about why this model cannot be created.The WMS capabilities are used to check the
WmsDataSource
validity. The WMS requests are following the 1.3.0 or the 1.1.1 specification depending on the version referred in the WMScapabilities
.This model does not support the entire WMS specification. The following restrictions are used:
- The returned raster model uses KVP (Key Value Pair). XML is not supported.
- The model uses a tiled approach to retrieve the data. The image tiles are requested in a coordinate reference advertised in the WMS capabilities.
- The raster layer for a WMS model uses the map reference to request the tiles when possible. Otherwise another reference is chosen, for example
CRS:84
. - The chosen reference is used to construct a tile matrix set that defines which tiles are requested from the WMS server. This tile matrix set covers the entire coordinate reference system.
- The data extent of the WMS data source is used to limit which tiles are requested from the WMS server. When no data extent is available no limits are applied. A margin is used to avoid possible artifacts at the tile boundaries. The model
bounds
is computed from the datasource's layers data extent if they are available, if not the bounds covers the entire coordinate reference system. - The supported image formats are
image/png
,image/jpeg
andimage/webp
. When no image format is specified in the data source, the first available format in the following order is used:image/png
,image/jpeg
,image/webp
.
- Parameters:
dataSource
- The structure describing the source to use for data retrieval.options
- Options for decoding WMS data, e.g. an optional http client implementation to send HTTP requests when fetching WMS resources.wmsCapabilities
- The source's capabilities. Can be retrieved before usingWmsCapabilities#getCapabilities
and reused. If set tonull
, it will be queried internally.- Returns:
- the model created for the WMS data source.
- Throws:
IOException
- when creation of the model fails.- Since:
- 2023.0
-
decode
@NotNull public static IRasterModel decode(@NotNull WmsDataSource dataSource, @NotNull WmsModelDecoderOptions options) throws IOException Creates a WMS raster model, or returns information about why this model cannot be created.The WMS capabilities are used to check the
WmsDataSource
validity. The WMS requests are following the 1.3.0 or the 1.1.1 specification depending on the version referred in the WMScapabilities
.This model does not support the entire WMS specification. The following restrictions are used:
- The returned raster model uses KVP (Key Value Pair). XML is not supported.
- The model uses a tiled approach to retrieve the data. The image tiles are requested in a coordinate reference advertised in the WMS capabilities.
- The raster layer for a WMS model uses the map reference to request the tiles when possible. Otherwise another reference is chosen, for example
CRS:84
. - The chosen reference is used to construct a tile matrix set that defines which tiles are requested from the WMS server. This tile matrix set covers the entire coordinate reference system.
- The data extent of the WMS data source is used to limit which tiles are requested from the WMS server. When no data extent is available no limits are applied. A margin is used to avoid possible artifacts at the tile boundaries. The model
bounds
is computed from the datasource's layers data extent if they are available, if not the bounds covers the entire coordinate reference system. - The supported image formats are
image/png
,image/jpeg
andimage/webp
. When no image format is specified in the data source, the first available format in the following order is used:image/png
,image/jpeg
,image/webp
.
- Parameters:
dataSource
- The structure describing the source to use for data retrieval.options
- Options for decoding WMS data, e.g. an optional http client implementation to send HTTP requests when fetching WMS resources.- Returns:
- the model created for the WMS data source.
- Throws:
IOException
- when creation of the model fails.- Since:
- 2023.0
-