Package com.luciad.wms.client.model
Class TLcdWMSGetMapRequest
java.lang.Object
com.luciad.wms.client.model.TLcdWMSGetMapRequest
- All Implemented Interfaces:
ILcdOWSRequest
A class which represents a WMS GetMap
request. Instances of this class can be created using the
TLcdWMSClient.createGetMapRequest()
method. This method will ensure a request object is created that is
compatible with the WMS version implemented by the WMS server.
This class can be passed to the TLcdWMSClient.getMap(TLcdWMSGetMapRequest)
method. This is low level
API though. There is higher level API available to perform GetMap requests, see TLcdWMSGetMapContext
.
- Since:
- 9.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns a key-value pair (KVP) encoding of this request.getRestEncoding
(URI aBaseURI) Returnsnull
, REST encoding is not supported.Returns an object representing data to be used by the transportation layer (seeILcdOWSTransport
) to perform this OGC Web Service request.Returns the XML encoding of this request.void
setBackgroundColor
(Color aBackgroundColor) Sets the background color which should be used for the requested map.void
setBoundingBox
(double aMinX, double aMaxX, double aMinY, double aMaxY) Sets the values of the 'bbox' parameter to the values of this bounding box.void
Sets the CRS which applies to the bounding box specified withsetBoundingBox(double, double, double, double)
.void
setDimension
(String aDimensionName, TLcdOGCWMSDimensionExtent aExtent) Sets the value for a given dimension name.void
setExceptions
(String aExceptionType) Sets the optional 'exceptions' parameter of the request.void
Sets the format which should be used for the requested map.void
setHeight
(int aHeight) A mandatory argument which specifies the height in pixels of the map which will be produced.void
setNamedLayer
(String aLayerName) Sets the layer to display in the result.void
setNamedLayers
(List<String> aLayerNames) Sets the list of layers which will be displayed in the result.void
setNamedStyle
(String aStyleName) Sets the style to be used for the layer which is set insetNamedLayer(java.lang.String)
.void
setNamedStyles
(List<String> aLayerStyles) Sets the list of styles which will be used to visualize layers in the result.void
setPixelSize
(double aPixelSize) Sets the size of a pixel.void
setRemoteOWSType
(String aOWSType) Sets the optional 'remote_ows_type' parameter, should be 'WCS' or 'WFS'.void
setRemoteOWSURL
(String aOWSURL) Sets the optional 'remote_ows_url' parameter.void
Sets a Styled Layer Descriptor which will be used for the 'sld_body' parameter.void
Sets an URL pointing to a valid Styled Layer Descriptor which will be used by the server.void
setTransparant
(boolean aTransparent) Deprecated.void
setTransparent
(boolean aTransparent) Sets whether background transparency should be used for the requested map.void
setTransportData
(Object aTransportData) Sets an object representing data to be used by the transportation layer (seeILcdOWSTransport
) to perform this OGC Web Service request.void
setWidth
(int aWidth) A mandatory argument which specifies the width in pixels of the map which will be produced.
-
Method Details
-
setBoundingBox
public void setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY) Sets the values of the 'bbox' parameter to the values of this bounding box.- Parameters:
aMinX
- The minimum X coordinate of the bounding boxaMaxX
- The maximum X coordinate of the bounding boxaMinY
- The minimum Y coordinate of the bounding boxaMaxY
- The maximum Y coordinate of the bounding box
-
setNamedLayer
Sets the layer to display in the result. All previously set names will be cleared.- Parameters:
aLayerName
- A valid layer name.- See Also:
-
setNamedLayers
Sets the list of layers which will be displayed in the result. The names in the list should correspond to layer names in the capabilities document of the server. All previously set names will be cleared.- Parameters:
aLayerNames
- A list containing layer names.- See Also:
-
setNamedStyles
Sets the list of styles which will be used to visualize layers in the result. The names in the list should correspond to style names in the capabilities document of the server. The number and ordering of the styles should correspond to the number of layers set withsetNamedLayers(java.util.List<java.lang.String>)
.- Parameters:
aLayerStyles
- A list containing names of layer styles.
-
setNamedStyle
Sets the style to be used for the layer which is set insetNamedLayer(java.lang.String)
.- Parameters:
aStyleName
- A valid layer style.
-
setStyledLayerDescriptor
Sets a Styled Layer Descriptor which will be used for the 'sld_body' parameter. Setting this parameter to a non-null value will clear any previously set sld URL or sld.- Parameters:
aSLD
- A valid SLD.- See Also:
-
setStyledLayerDescriptorURL
Sets an URL pointing to a valid Styled Layer Descriptor which will be used by the server. Setting this parameter to a non-null value will clear any previously set sld URL or sld.- Parameters:
aURL
- A URL which points to a valid SLD.- See Also:
-
setWidth
public void setWidth(int aWidth) A mandatory argument which specifies the width in pixels of the map which will be produced. In case the server has specified a fixed layer width, this width should be used. The value should be smaller than or equal to the maximum width which can be specified by the server.- Parameters:
aWidth
- A positive integer specifying a size in pixels.
-
setHeight
public void setHeight(int aHeight) A mandatory argument which specifies the height in pixels of the map which will be produced. In case the server has specified a fixed layer height, this height should be used. The value should be smaller than or equal to the maximum height which can be specified by the server.- Parameters:
aHeight
- A positive integer specifying a size in pixels.
-
setFormat
Sets the format which should be used for the requested map. The server will return a ServiceException in case the format is not supported.- Parameters:
aFormat
- A valid mime type which specifies the desired format.
-
setExceptions
Sets the optional 'exceptions' parameter of the request. The default value is "application/vnd.ogc.se_xml", other possible values are available in the capabilities of the WMS.- Parameters:
aExceptionType
- String corresponding to a valid type of exception.
-
setBackgroundColor
Sets the background color which should be used for the requested map. By default,Color.WHITE
is used as background color, following the WMS specification. Ifnull
is set, the background color parameter is omitted in requests.- Parameters:
aBackgroundColor
- A color which should be used in the request.
-
setTransparent
public void setTransparent(boolean aTransparent) Sets whether background transparency should be used for the requested map.- Parameters:
aTransparent
- boolean which should be true if the background pixels of the result should be made transparent, false otherwise.- Since:
- 2021.0
-
setTransparant
public void setTransparant(boolean aTransparent) Deprecated.Since 2021.0: usesetTransparent
instead.- See Also:
-
setPixelSize
public void setPixelSize(double aPixelSize) Sets the size of a pixel. The WMS server can take this into account when calculating scale and evaluating scale ranges.- Parameters:
aPixelSize
- The size of a pixel, in mm. The default value is calculated based on the resolution of the screen.
-
setCRS
Sets the CRS which applies to the bounding box specified withsetBoundingBox(double, double, double, double)
. The value is one of the values defined in the capabilities of the server.- Parameters:
aCRS
- A String which corresponds to a valid CRS for the server.
-
setDimension
Sets the value for a given dimension name. TheTLcdOGCWMSDimensionExtent
domain object is used to represent the value.
If XML encoding is to be used with this request, additional restrictions apply to the possible values in the extent. For the 'time' dimension:
Only one value is supported, and it should be a valid XML dateTime String. If the value is invalid,getXMLEncoding()
will return null. Intervals are not supported. For the 'elevation' dimension:
If using intervals, only the first interval will be encoded in the XML request. Custom dimensions cannot be encoded in an XML request.These limitations are necessary to comply with the GetMap schema.
- Parameters:
aDimensionName
- Name of a dimension, without the 'dim_' prefix.aExtent
- The actual extent of the dimension containing either values or intervals.
-
setRemoteOWSType
Sets the optional 'remote_ows_type' parameter, should be 'WCS' or 'WFS'.- Parameters:
aOWSType
- A valid OWS type.
-
setRemoteOWSURL
Sets the optional 'remote_ows_url' parameter.- Parameters:
aOWSURL
- The URL of an OWS.
-
getKVPEncoding
Description copied from interface:ILcdOWSRequest
Returns a key-value pair (KVP) encoding of this request. If no key-value pairs are defined, an empty map should be returned. If no key-value pair encoding is supported for this request,null
should be returned.- Specified by:
getKVPEncoding
in interfaceILcdOWSRequest
- Returns:
- the key-value pair (KVP) representation of this request.
-
getXMLEncoding
Description copied from interface:ILcdOWSRequest
Returns the XML encoding of this request. If no XML encoding is supported for this request,null
should be returned.- Specified by:
getXMLEncoding
in interfaceILcdOWSRequest
- Returns:
- the XML representation of this request.
-
setTransportData
Sets an object representing data to be used by the transportation layer (seeILcdOWSTransport
) to perform this OGC Web Service request. The type of object and the data contained in it depends on theILcdOWSTransport
object used to perform this request.- Parameters:
aTransportData
- an object representing data to be used by the transportation layer to perform this OGC Web Service request.- See Also:
-
getTransportData
Description copied from interface:ILcdOWSRequest
Returns an object representing data to be used by the transportation layer (seeILcdOWSTransport
) to perform this OGC Web Service request. The type of object and the data contained in it depends on theILcdOWSTransport
object used to perform this request. An example in the case of a HTTP transport connection is a map of request properties (seeURLConnection.getRequestProperties()
) to be used for the request.- Specified by:
getTransportData
in interfaceILcdOWSRequest
- Returns:
- an object representing data to be used by the transportation layer to perform this OGC Web Service request.
-
getRestEncoding
Returnsnull
, REST encoding is not supported.- Specified by:
getRestEncoding
in interfaceILcdOWSRequest
- Parameters:
aBaseURI
-- Returns:
null
- Since:
- 2013.0
-
setTransparent
instead.