LuciadCPillar C# 2025.0
Luciad.Formats.Wms.WmsModelDecoder Class Reference

Creates an IRasterModel that connects to a WMS service. More...

Static Public Member Functions

static Luciad.Models.Rasters.IRasterModel Decode (Luciad.Formats.Wms.WmsDataSource dataSource, Luciad.Formats.Wms.WmsCapabilities wmsCapabilities=null)
 Creates a WMS raster model, or returns information about why this model cannot be created. More...
 
static Luciad.Models.Rasters.IRasterModel Decode (Luciad.Formats.Wms.WmsDataSource dataSource, Luciad.Formats.Wms.WmsModelDecoderOptions options, Luciad.Formats.Wms.WmsCapabilities wmsCapabilities=null)
 Creates a WMS raster model, or returns information about why this model cannot be created. More...
 

Detailed Description

Creates an IRasterModel that connects to a WMS service.

See WmsModelDecoder.Decode for more details.

Since
2020.2

Member Function Documentation

◆ Decode() [1/2]

static Luciad.Models.Rasters.IRasterModel Luciad.Formats.Wms.WmsModelDecoder.Decode ( Luciad.Formats.Wms.WmsDataSource  dataSource,
Luciad.Formats.Wms.WmsCapabilities  wmsCapabilities = null 
)
inlinestatic

Creates a WMS raster model, or returns information about why this model cannot be created.

Parameters
dataSourceThe structure describing the source to use for data retrieval.
wmsCapabilitiesThe source's capabilities. Can be retrieved before using WmsCapabilities.GetCapabilities and reused. If set to null, it will be queried internally.
Returns
the model created for the WMS data source.
Exceptions
System.IO.IOExceptionwhen creation of the model fails.

◆ Decode() [2/2]

static Luciad.Models.Rasters.IRasterModel Luciad.Formats.Wms.WmsModelDecoder.Decode ( Luciad.Formats.Wms.WmsDataSource  dataSource,
Luciad.Formats.Wms.WmsModelDecoderOptions  options,
Luciad.Formats.Wms.WmsCapabilities  wmsCapabilities = null 
)
inlinestatic

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 WMS capabilities.

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 and image/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
dataSourceThe structure describing the source to use for data retrieval.
optionsOptions for decoding WMS data, e.g. an optional http client implementation to send HTTP requests when fetching WMS resources.
wmsCapabilitiesThe source's capabilities. Can be retrieved before using WmsCapabilities.GetCapabilities and reused. If set to null, it will be queried internally.
Returns
the model created for the WMS data source.
Exceptions
System.IO.IOExceptionwhen creation of the model fails.
Since
2023.0