Class TLcdWMSGetMapRequest

java.lang.Object
com.luciad.wms.client.model.TLcdWMSGetMapRequest
All Implemented Interfaces:
ILcdOWSRequest

public class TLcdWMSGetMapRequest extends Object implements 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 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 box
      aMaxX - The maximum X coordinate of the bounding box
      aMinY - The minimum Y coordinate of the bounding box
      aMaxY - The maximum Y coordinate of the bounding box
    • setNamedLayer

      public void setNamedLayer(String aLayerName)
      Sets the layer to display in the result.

      All previously set names will be cleared.

      Parameters:
      aLayerName - A valid layer name.
      See Also:
    • setNamedLayers

      public void setNamedLayers(List<String> aLayerNames)
      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

      public void setNamedStyles(List<String> aLayerStyles)
      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 with setNamedLayers(java.util.List<java.lang.String>).
      Parameters:
      aLayerStyles - A list containing names of layer styles.
    • setNamedStyle

      public void setNamedStyle(String aStyleName)
      Sets the style to be used for the layer which is set in setNamedLayer(java.lang.String).
      Parameters:
      aStyleName - A valid layer style.
    • setStyledLayerDescriptor

      public void setStyledLayerDescriptor(TLcdSLDStyledLayerDescriptor aSLD)
      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

      public void setStyledLayerDescriptorURL(URL aURL)
      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

      public void setFormat(String aFormat)
      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

      public void setExceptions(String aExceptionType)
      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

      public void setBackgroundColor(Color aBackgroundColor)
      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. If null 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: use setTransparent 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

      public void setCRS(String aCRS)
      Sets the CRS which applies to the bounding box specified with setBoundingBox(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

      public void setDimension(String aDimensionName, TLcdOGCWMSDimensionExtent aExtent)
      Sets the value for a given dimension name. The TLcdOGCWMSDimensionExtent 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

      public void setRemoteOWSType(String aOWSType)
      Sets the optional 'remote_ows_type' parameter, should be 'WCS' or 'WFS'.
      Parameters:
      aOWSType - A valid OWS type.
    • setRemoteOWSURL

      public void setRemoteOWSURL(String aOWSURL)
      Sets the optional 'remote_ows_url' parameter.
      Parameters:
      aOWSURL - The URL of an OWS.
    • getKVPEncoding

      public Map 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 interface ILcdOWSRequest
      Returns:
      the key-value pair (KVP) representation of this request.
    • getXMLEncoding

      public InputStream getXMLEncoding()
      Description copied from interface: ILcdOWSRequest
      Returns the XML encoding of this request.

      If no XML encoding is supported for this request, nullshould be returned.

      Specified by:
      getXMLEncoding in interface ILcdOWSRequest
      Returns:
      the XML representation of this request.
    • setTransportData

      public void setTransportData(Object aTransportData)
      Sets an object representing data to be used by the transportation layer (see ILcdOWSTransport) to perform this OGC Web Service request. The type of object and the data contained in it depends on the ILcdOWSTransport 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

      public Object getTransportData()
      Description copied from interface: ILcdOWSRequest
      Returns an object representing data to be used by the transportation layer (see ILcdOWSTransport) to perform this OGC Web Service request. The type of object and the data contained in it depends on the ILcdOWSTransport object used to perform this request.

      An example in the case of a HTTP transport connection is a map of request properties (see URLConnection.getRequestProperties()) to be used for the request.

      Specified by:
      getTransportData in interface ILcdOWSRequest
      Returns:
      an object representing data to be used by the transportation layer to perform this OGC Web Service request.
    • getRestEncoding

      public URI getRestEncoding(URI aBaseURI)
      Returns null, REST encoding is not supported.
      Specified by:
      getRestEncoding in interface ILcdOWSRequest
      Parameters:
      aBaseURI -
      Returns:
      null
      Since:
      2013.0