Class ALcdWMSProxy
- All Implemented Interfaces:
ILcdBounded,ILcdCache,Cloneable
ALcdWMSProxy is an object that acts as a proxy
towards a Web Map Service (WMS).
It is used as domain object inside an ILcdModel decoded by
TLcdOGCWMSProxyModelDecoder and has the following roles:
- Description of the WMS server: it contains the capabilities of the WMS server,
which can be retrieved through the method
getWMSCapabilities(). These capabilities describe the hierarchy of available layers and styles at the server, service metadata, supported formats, etc. The root of the layer hierarchy can be retrieved throughALcdOGCWMSCapabilities.getWMSRootNamedLayer(int). Each layer is represented by anALcdWMSNamedLayerobject, and optionally contains a set of child layers. - Configuration of the WMS client: it describes the configuration at the WMS client, namely
- the layers that should be included in a map or feature info query,
- the formats to be used for a map query or feature info query,
- the desired exception format to be used by the server to encode service exceptions,
- whether returned maps should use a transparent background color,
- any additional request parameters that should be used for the connection (e.g., proxy server configuration).
TLcdWMSStyledNamedLayerWrappermust be added to this proxy for each desiredALcdWMSLayer(seeaddStyledNamedLayer(TLcdWMSStyledNamedLayerWrapper)). - Sending queries to the WMS server: it offers methods to send out a query based on the current configuration
of the layers and formats, and retrieve the result as an
InputStream, namelycreateImageInputStream: sends out a GetMap query,createFeatureInfoInputStream: sends out a GetFeatureInfo query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDimension(TLcdOGCWMSDimensionWrapper aDimension) Adds a wrapper class for a dimension having an extent to the list of dimensions to be used in the request.abstract voidaddStyledNamedLayer(TLcdWMSStyledNamedLayerWrapper aStyledNamedLayer) Adds a wrapper class for a named layer having a style to the list of layers to request from the WMS.voidClears the cache.voidClears all theTLcdOGCWMSDimensionWrappers.abstract voidClears all theTLcdWMSStyledNamedLayerWrappers.clone()Creates and returns a shallow copy of this object.abstract InputStreamcreateFeatureInfoInputStream(int aWidth, int aHeight, ILcdXYWorldReference aXYWorldReference, ILcdBounds aBounds, Color aBackgroundColor, int aX, int aY, int aFeatureCount) Deprecated.abstract InputStreamcreateFeatureInfoInputStream(TLcdWMSGetFeatureInfoContext aGetFeatureInfoContext, TLcdWMSGetFeatureInfoParameters aGetFeatureInfoParameters) Sends aGetFeatureInforequest with the given parameters to the WMS configured in the capabilities (seegetWMSCapabilities()), and returns the result as anInputStreamobject.createImage(int aWidth, int aHeight, ILcdXYWorldReference aXYWorldReference, ILcdBounds aBounds, Color aBackgroundColor) Deprecated.Use the methodcreateImageInputStream, to which this default implementation delegates.abstract InputStreamcreateImageInputStream(int aWidth, int aHeight, ILcdXYWorldReference aXYWorldReference, ILcdBounds aBounds, Color aBackgroundColor) Deprecated.usecreateImageInputStream(TLcdWMSGetMapContext)insteadabstract InputStreamcreateImageInputStream(TLcdWMSGetMapContext aGetMapContext) Sends aGetMaprequest with the given parameters to the WMS configured in the capabilities (seegetWMSCapabilities()), and returns the result as anInputStreamobject.final ALcdWMSNamedLayerfindWMSNamedLayer(String aNamedLayerName) Returns the WMS layer from the capabilities for which the uniquelayer nameequals the given name.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.getDimension(int aIndex) Returns theTLcdOGCWMSDimensionWrapperat the specified index.intReturns the number of dimension objects within the request to the WMS.Returns the exception format value that is used by the WMS to encode service exception reports.Returns the exception handler of thisALcdWMSProxyReturns the feature info format value that is used when sendingGetFeatureInforequests to the WMS.Returns the map format value that is used when sendingGetMaprequests to the WMS.final List<ALcdWMSNamedLayer> getNamedLayers(boolean aOnlyVisible, boolean aOnlyQueryable) This method returns a list of named layers that are registered on this proxy object.doubleReturns the configured pixel size.Returns the Styled Layer Descriptor (SLD) which will be sent along with requests.Return the URL pointing to a valid Styled Layer Descriptor (SLD), which will be sent along with requests.abstract TLcdWMSStyledNamedLayerWrappergetStyledNamedLayer(int aIndex) Returns theTLcdWMSStyledNamedLayerWrapperat an index.abstract intReturns the number of styled named layer objects within the request to the WMS.abstract StringgetSupportedMapFormat(int aIndex) Returns the supported map format at the given index.abstract intReturns the number of map formats supported by the WMS.abstract ALcdOGCWMSCapabilitiesReturns anALcdOGCWMSCapabilitiesinstance that contains the capabilities of the WMS.abstract ALcdWMSNamedLayergetWMSRootNamedLayer(int aIndex) Returns the top level layer at a given index.abstract intReturns the number of top levelALcdWMSNamedLayerinstances.voidinsertIntoCache(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.booleanReturns if the WMS is request to return an image with a transparent background.abstract booleanReturns whether the images returned by the WMS are cached.booleanReturns true if the bounding box coordinates should be inverted in case the world reference of the request is EPSG:4326 and the WMS version is 1.3.0.abstract booleanisSupportedXYworldReference(ILcdXYWorldReference aXYWorldReference, ALcdWMSNamedLayer aWMSNamedLayer) Tests if the givenILcdXYWorldReferenceis supported for the given layer.abstract voidmoveStyledNamedLayer(TLcdWMSStyledNamedLayerWrapper aStyledNamedLayer, int aToIndex) Moves theTLcdWMSStyledNamedLayerWrapperfrom its current position to another specified index.abstract voidputAdditionalParameter(String aParameterName, String aParameterValue) Sets an additional parameter for connecting to the WMS.abstract voidremoveAdditionalParameter(String aParameterName) Removes the additional parameter with the given name.removeCachedObject(Object aKey) Looks up and removes the cached Object corresponding to the given key.voidremoveDimension(int aIndex) Removes theTLcdOGCWMSDimensionWrapperat the specified index.abstract voidremoveStyledNamedLayer(int aIndex) Removes theTLcdWMSStyledNamedLayerWrapperat an index.voidsetBackgroundImageTransparent(boolean aTransparent) Sets if the WMS should return an image whose background is transparent.abstract voidsetCacheImage(boolean aCacheImage) Sets whether the images returned by the WMS should be cached.voidsetExceptionFormat(String aExceptionFormat) Sets the exception format value to be used by the WMS to encode service exception reports.voidsetExceptionHandler(ILcdExceptionHandler aExceptionHandler) Sets the exception handler which is to be used by this proxy.voidsetFeatureInfoFormat(String aFeatureInfoFormat) Sets the feature info format value to be used when sendingGetFeatureInforequests to the WMS.voidsetInvertXYForEPSG4326(boolean aInvertXYForEPSG4326) Sets whether the bounding box coordinates should be inverted in case the world reference of the request is EPSG:4326 and the WMS version is 1.3.0.voidsetMapFormat(String aMapFormat) Sets the map format value to be used when sendingGetMaprequests to the WMS.voidsetPixelSize(double aPixelSize) Sets the pixel size that should be passed to the WMS server.voidSets a Styled Layer Descriptor (SLD) to send along with requests.voidSets an URL pointing to a valid Styled Layer Descriptor (SLD), to send along with requests.static TLcdWMSDataSourcetoDataSource(ALcdWMSProxy aWMSProxy) Converts the settings configured in the{@link ALcdWMSProxy WMS proxy}object into aWMS data sourcerepresentation.
-
Constructor Details
-
ALcdWMSProxy
public ALcdWMSProxy()
-
-
Method Details
-
createImage
public Image createImage(int aWidth, int aHeight, ILcdXYWorldReference aXYWorldReference, ILcdBounds aBounds, Color aBackgroundColor) Deprecated.Use the methodcreateImageInputStream, to which this default implementation delegates.Sends aGetMaprequest with the given parameters to the WMS server configured in the capabilities (seegetWMSCapabilities()), and returns the result as anImageobject, if recognized as such. If the result is not an image (e.g., a service exception or an HTTP error),nullis returned.This method delegates by default to
createImageInputStream(int, int, com.luciad.view.ILcdXYWorldReference, com.luciad.shape.ILcdBounds, java.awt.Color).- Parameters:
aWidth- the width of the map.aHeight- the height of the map.aXYWorldReference- the reference in which the map should be returned.aBounds- the area of interest, specified in the reference of the map to be returned.aBackgroundColor- the background color to use for the map.- Returns:
- an
Imagecontaining the map returned by the WMS, ornullif the result is not recognized.
-
createImageInputStream
public abstract InputStream createImageInputStream(int aWidth, int aHeight, ILcdXYWorldReference aXYWorldReference, ILcdBounds aBounds, Color aBackgroundColor) throws IOException Deprecated.usecreateImageInputStream(TLcdWMSGetMapContext)insteadSends aGetMaprequest with the given parameters to the WMS configured in the capabilities (seegetWMSCapabilities()), and returns the result as anInputStreamobject.- Parameters:
aWidth- the width of the map.aHeight- the height of the map.aXYWorldReference- the reference in which the map should be returned.aBounds- the area of interest, specified in the reference of the map to be returned.aBackgroundColor- the background color to use for the map.- Returns:
- an
InputStreamcontaining the result of a WMSGetMaprequest with the given parameters. - Throws:
TLcdOGCWMSServiceException- when the server sends a service exception report.TLcdOGCWMSHttpException- when a HTTP error is received.TLcdOGCWMSException- in all other cases (e.g. incorrect request properties, unrecognized result of the server, ...).IOException
-
createImageInputStream
public abstract InputStream createImageInputStream(TLcdWMSGetMapContext aGetMapContext) throws IOException Sends aGetMaprequest with the given parameters to the WMS configured in the capabilities (seegetWMSCapabilities()), and returns the result as anInputStreamobject.- Parameters:
aGetMapContext- the GetMap context- Returns:
- an
InputStreamcontaining the result of a WMSGetMaprequest with the given parameters. - Throws:
TLcdOGCWMSServiceException- when the server sends a service exception report.TLcdOGCWMSHttpException- when a HTTP error is received.TLcdOGCWMSException- in all other cases (e.g. incorrect request properties, unrecognized result of the server, ...).IOException
-
createFeatureInfoInputStream
public abstract InputStream createFeatureInfoInputStream(int aWidth, int aHeight, ILcdXYWorldReference aXYWorldReference, ILcdBounds aBounds, Color aBackgroundColor, int aX, int aY, int aFeatureCount) throws IOException Deprecated.Sends aGetFeatureInforequest with the given parameters to the WMS configured in the capabilities (seegetWMSCapabilities()), and returns the result as anInputStreamobject.- Parameters:
aWidth- the width of the map of interest.aHeight- the height of the map of interest.aXYWorldReference- the reference in which the map should be generated.aBounds- the area of interest, specified in the reference of the generated map.aBackgroundColor- the background color to use for the map (note: the result of aGetFeatureInforequest can also be a map with the feature painted selected and/or labeled, instead of just textual information).aX- the x coordinate in pixels of the point of interest.aY- the y coordinate in pixels of the point of interest.aFeatureCount- the maximum number of features per layer for which feature information shall be returned. If other than a positive integer, the default value 1 will be used, following the WMS specification.- Returns:
- an
InputStreamcontaining the result of a WMSGetFeatureInforequest with the given parameters. - Throws:
TLcdOGCWMSServiceException- when the server sends a service exception report.TLcdOGCWMSHttpException- when a HTTP error is received.TLcdOGCWMSException- in all other cases (e.g. incorrect request properties, unrecognized result of the server, ...).IOException
-
createFeatureInfoInputStream
public abstract InputStream createFeatureInfoInputStream(TLcdWMSGetFeatureInfoContext aGetFeatureInfoContext, TLcdWMSGetFeatureInfoParameters aGetFeatureInfoParameters) throws IOException Sends a
GetFeatureInforequest with the given parameters to the WMS configured in the capabilities (seegetWMSCapabilities()), and returns the result as anInputStreamobject. It is possible to specify additional query parameters using the givenTLcdWMSGetFeatureInfoParametersobject.When the given
TLcdWMSGetFeatureInfoParametersobject doesn't specify a certain parameter, a default parameter is used. For example, when not specifying a feature info format, the feature info format set on this object will be used. When not specifying a set of layers to query, all layers will be queried.- Parameters:
aGetFeatureInfoContext- The GetFeatureInfo contextaGetFeatureInfoParameters- The (optional) GetFeatureInfo parameters. Should not benull.- Returns:
- an
InputStreamcontaining the result of a WMSGetFeatureInforequest with the given parameters. - Throws:
TLcdOGCWMSServiceException- when the server sends a service exception report.TLcdOGCWMSHttpException- when a HTTP error is received.TLcdOGCWMSException- in all other cases (e.g. incorrect request properties, unrecognized result of the server, ...).IOException
-
getMapFormat
Returns the map format value that is used when sendingGetMaprequests to the WMS. Its value is one of the supported map formats (specified by its MIME-type).- Returns:
- the value of the mapFormat property.
- See Also:
-
setMapFormat
Sets the map format value to be used when sendingGetMaprequests to the WMS. Its value has to be one of the map formats returned byALcdOGCWMSCapabilities.getSupportedMapFormat(int).- Parameters:
aMapFormat- the value of the map format property.- See Also:
-
getFeatureInfoFormat
Returns the feature info format value that is used when sendingGetFeatureInforequests to the WMS. Its value is one of the supported feature info formats (specified by its MIME-type).- Returns:
- the value of the mapFormat property.
- See Also:
-
setFeatureInfoFormat
Sets the feature info format value to be used when sendingGetFeatureInforequests to the WMS. Its value has to be one of the feature info formats returned byALcdOGCWMSCapabilities.getSupportedFeatureInfoFormat(int).- Parameters:
aFeatureInfoFormat- the value of the feature info format property.- See Also:
-
getExceptionFormat
Returns the exception format value that is used by the WMS to encode service exception reports. Its value is one of the supported exception formats or null for the default.- Returns:
- the value of the exception format property.
- See Also:
-
setExceptionFormat
Sets the exception format value to be used by the WMS to encode service exception reports. Its value has to be one of the exception formats returned byALcdOGCWMSCapabilities.getSupportedExceptionFormat(int)or null for the default exception format.- Parameters:
aExceptionFormat- the value of the exception format property.- See Also:
-
getSupportedMapFormatCount
public abstract int getSupportedMapFormatCount()Returns the number of map formats supported by the WMS. This is equivalent withgetWMSCapabilities().getSupportedMapFormatCount().- Returns:
- the number of map formats supported by the WMS.
-
getSupportedMapFormat
Returns the supported map format at the given index. The format is specified by its MIME-type. This is equivalent withgetWMSCapabilities().getSupportedMapFormat(int).- Parameters:
aIndex- the index of the map format to return.- Returns:
- the supported map format at a given index.
- Throws:
IndexOutOfBoundsException- in case of an invalid index.
-
getWMSRootNamedLayerCount
public abstract int getWMSRootNamedLayerCount()Returns the number of top levelALcdWMSNamedLayerinstances. This is equivalent withgetWMSCapabilities().getWMSRootNamedLayerCount().- Returns:
- the number of top level
ALcdWMSNamedLayerinstances.
-
getWMSRootNamedLayer
Returns the top level layer at a given index. This is equivalent withgetWMSCapabilities().getWMSRootNamedLayer(int).- Parameters:
aIndex- the index of the top level layer.- Returns:
- the top level layer at a given index.
- Throws:
IndexOutOfBoundsException- if the index is out of bounds.
-
addStyledNamedLayer
Adds a wrapper class for a named layer having a style to the list of layers to request from the WMS. Only wrapper instances having a visible state true are requested from the WMS.- Parameters:
aStyledNamedLayer- the styled named layer.
-
getStyledNamedLayerCount
public abstract int getStyledNamedLayerCount()Returns the number of styled named layer objects within the request to the WMS.- Returns:
- the number of styled named layer objects within the request to the WMS.
-
getStyledNamedLayer
public abstract TLcdWMSStyledNamedLayerWrapper getStyledNamedLayer(int aIndex) throws IndexOutOfBoundsException Returns theTLcdWMSStyledNamedLayerWrapperat an index.- Parameters:
aIndex- the index of theTLcdWMSStyledNamedLayerWrapper.- Returns:
- the
TLcdWMSStyledNamedLayerWrapperat an index. - Throws:
IndexOutOfBoundsException- in case of an invalid index value.
-
moveStyledNamedLayer
public abstract void moveStyledNamedLayer(TLcdWMSStyledNamedLayerWrapper aStyledNamedLayer, int aToIndex) throws IndexOutOfBoundsException, NoSuchElementException Moves theTLcdWMSStyledNamedLayerWrapperfrom its current position to another specified index.- Parameters:
aStyledNamedLayer- theTLcdWMSStyledNamedLayerWrapperto move.aToIndex- the index to move to.- Throws:
IndexOutOfBoundsException- in case of an invalid index value.NoSuchElementException- if theTLcdWMSStyledNamedLayerWrapperdoes not exists within the list.
-
removeStyledNamedLayer
Removes theTLcdWMSStyledNamedLayerWrapperat an index.- Parameters:
aIndex- the index of theTLcdWMSStyledNamedLayerWrapperto remove.- Throws:
IndexOutOfBoundsException- in case of an invalid index value.
-
clearStyledNamedLayers
public abstract void clearStyledNamedLayers()Clears all theTLcdWMSStyledNamedLayerWrappers. -
setStyledLayerDescriptor
Sets a Styled Layer Descriptor (SLD) to send along with requests. The specified SLD will be embedded as XML in the request.Another approach to configure an SLD is to specify an URL that points to the SLD. This is possible through the method
setStyledLayerDescriptorURL(java.net.URL).Only one SLD can be specified at a given time. Setting an SLD with this method therefore overrides any configured SLD URL (see
getStyledLayerDescriptorURL()) and vice versa.- Parameters:
aSLD- A valid SLD.- See Also:
-
getStyledLayerDescriptor
Returns the Styled Layer Descriptor (SLD) which will be sent along with requests. By default,nullis returned.- Returns:
- an SLD or
nullif no SLD has been specified.
-
setStyledLayerDescriptorURL
Sets an URL pointing to a valid Styled Layer Descriptor (SLD), to send along with requests. The URL will be included in the request, not the SLD itself. The server therefore needs to be able to access the URL, in order to use the SLD.Another approach to configure an SLD is to set an SLD domain object that will be embedded in the request itself. This is possible through the method
setStyledLayerDescriptor(com.luciad.wms.sld.model.TLcdSLDStyledLayerDescriptor).Only one SLD can be specified at a given time. Setting a link to an SLD with this method therefore overrides any configured SLD domain object (see
getStyledLayerDescriptor()) and vice versa.- Parameters:
aURL- A URL which points to a valid SLD.- See Also:
-
getStyledLayerDescriptorURL
Return the URL pointing to a valid Styled Layer Descriptor (SLD), which will be sent along with requests. By default,nullis returned.- Returns:
- an URL pointing to an SLD or
nullif no URL has been specified.
-
getNamedLayers
This method returns a list of named layers that are registered on this proxy object. The returned list contains:
- All styled named layers: see also
getStyledNamedLayer. - All SLD layers. SLD layers are only returned when there are no registered styled named layers
and when an SLD is defined in this proxy, see
setStyledLayerDescriptororsetStyledLayerDescriptorURL. In that case, it will retrieve the layers from that SLD. In case of an SLD named layer, it will be converted to anALcdWMSNamedLayer; in case of anSLD user layer, a dummyALcdWMSNamedLayerwill be used as placeholder, with world bounds.
- Parameters:
aOnlyVisible-trueto only return visible named layers.aOnlyQueryable-trueto only return queryable named layer, i.e. layers for which GetFeatureInfo requests are enabled.- Returns:
- a list of named layers that are registered on this proxy object, or an empty list if no layers are found never
null. - Since:
- 2016.1
- All styled named layers: see also
-
addDimension
Adds a wrapper class for a dimension having an extent to the list of dimensions to be used in the request.- Parameters:
aDimension- the dimension with the extent.
-
getDimensionCount
public int getDimensionCount()Returns the number of dimension objects within the request to the WMS.- Returns:
- the number of dimension objects within the request to the WMS.
-
getDimension
Returns theTLcdOGCWMSDimensionWrapperat the specified index.- Parameters:
aIndex- the index of theTLcdOGCWMSDimensionWrapper.- Returns:
- the
TLcdOGCWMSDimensionWrapperat the specified index. - Throws:
IndexOutOfBoundsException- in case of an invalid index value.
-
removeDimension
public void removeDimension(int aIndex) Removes theTLcdOGCWMSDimensionWrapperat the specified index.- Parameters:
aIndex- the index of theTLcdOGCWMSDimensionWrapperto remove.- Throws:
IndexOutOfBoundsException- in case of an invalid index value.
-
clearDimensions
public void clearDimensions()Clears all theTLcdOGCWMSDimensionWrappers. -
setBackgroundImageTransparent
public void setBackgroundImageTransparent(boolean aTransparent) Sets if the WMS should return an image whose background is transparent. For this to be useful the requested map format should be capable of representing a transparent background.- Parameters:
aTransparent- the new transparent property value.- See Also:
-
isBackgroundImageTransparent
public boolean isBackgroundImageTransparent()Returns if the WMS is request to return an image with a transparent background.- Returns:
- if the WMS is request to return an image with a transparent background.
- See Also:
-
setPixelSize
public void setPixelSize(double aPixelSize) Sets the pixel size that should be passed to the WMS server. If the WMS server supports thePIXELSIZEparameter, it can take it into account when evaluation scale ranges.- Parameters:
aPixelSize- The size of a pixel on the client screen, in mm. Should be larger than 0.
-
getPixelSize
public double getPixelSize()Returns the configured pixel size.- Returns:
- The pixel size in mm. The default value is calculated based on the resolution of the client screen.
- See Also:
-
putAdditionalParameter
public abstract void putAdditionalParameter(String aParameterName, String aParameterValue) throws IllegalArgumentException Sets an additional parameter for connecting to the WMS.- Parameters:
aParameterName- the name of the parameter.aParameterValue- the corresponding value.- Throws:
IllegalArgumentException- if the parameter name is illegal.
-
removeAdditionalParameter
Removes the additional parameter with the given name.- Parameters:
aParameterName- the name of the parameter to be removed.
-
isSupportedXYworldReference
public abstract boolean isSupportedXYworldReference(ILcdXYWorldReference aXYWorldReference, ALcdWMSNamedLayer aWMSNamedLayer) Tests if the givenILcdXYWorldReferenceis supported for the given layer.- Parameters:
aXYWorldReference- the world reference to test.aWMSNamedLayer- the named layer to check against.- Returns:
- true if the given
ILcdXYWorldReferenceis supported for the given layer.
-
getWMSCapabilities
Returns anALcdOGCWMSCapabilitiesinstance that contains the capabilities of the WMS.- Returns:
- an
ALcdOGCWMSServiceinstance that contains the capabilities of the WMS.
-
isCacheImage
public abstract boolean isCacheImage()Returns whether the images returned by the WMS are cached.- Returns:
- True if the images returned by the WMS are cached.
-
setCacheImage
public abstract void setCacheImage(boolean aCacheImage) Sets whether the images returned by the WMS should be cached. Note that image caching improves the performance but also requires more memory. Implementations of this class are recommended to take into account this property.- Parameters:
aCacheImage- the new image caching property value.
-
getExceptionHandler
Returns the exception handler of thisALcdWMSProxy- Returns:
- The exception handler set by
setExceptionHandler, null if none has been set.
-
setExceptionHandler
Sets the exception handler which is to be used by this proxy. By default, it is set to null.- Parameters:
aExceptionHandler- A valid exception handler, or null to remove the current exception handler.
-
isInvertXYForEPSG4326
public boolean isInvertXYForEPSG4326()Returns true if the bounding box coordinates should be inverted in case the world reference of the request is EPSG:4326 and the WMS version is 1.3.0. This means that instead of x=lon and y=lat, x=lat and y=lon will be used.- Returns:
- True if coordinates are inverted for EPSG:4326.
-
setInvertXYForEPSG4326
public void setInvertXYForEPSG4326(boolean aInvertXYForEPSG4326) Sets whether the bounding box coordinates should be inverted in case the world reference of the request is EPSG:4326 and the WMS version is 1.3.0. This means that instead of x=lon and y=lat, x=lat and y=lon will be used.For WMS version 1.1.1, the order is defined as x=lon, y=lat. In version 1.3.0 it was decided that the order should be consistent with the order defined in the EPSG:4326 reference which is lat/lon. Consequently, some WMS 1.3.0 servers have changed their interpretation of EPSG:4326 coordinates, while others sticked to the old (WMS 1.1.1) interpretation.
Also note that EPSG:4326 is officially deprecated, so this problem can be avoided if the server supports different reference systems.
By default this is set to false.
- Parameters:
aInvertXYForEPSG4326- True if coordinates should be inverted for EPSG:4326 and WMS 1.3.0.
-
getBounds
Description copied from interface:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-
insertIntoCache
Description copied from interface:ILcdCacheInserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCachein interfaceILcdCache- Parameters:
aKey- the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself:insertIntoCache(this, ...).aObject- the Object to be cached.
-
getCachedObject
Description copied from interface:ILcdCacheLooks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObjectin interfaceILcdCache- Parameters:
aKey- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there is no Object corresponding to the given key.
-
removeCachedObject
Description copied from interface:ILcdCacheLooks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObjectin interfaceILcdCache- Parameters:
aKey- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there was no Object corresponding to the given key.
-
clearCache
public void clearCache()Description copied from interface:ILcdCacheClears the cache.- Specified by:
clearCachein interfaceILcdCache
-
findWMSNamedLayer
Returns the WMS layer from the capabilities for which the unique
layer nameequals the given name.- Parameters:
aNamedLayerName- The name of the searched WMS named layer- Returns:
- the
ALcdWMSNamedLayerfrom the WMS capabilities with nameaNamedLayerName, ornullwhen no such layer can be found.
-
clone
Creates and returns a shallow copy of this object. -
toDataSource
Converts the settings configured in the{@link ALcdWMSProxy WMS proxy}object into aWMS data sourcerepresentation.The following settings are taken into account:
- The server URI.
- The chosen map format.
- The selected layers along with their selected layer style, visibility and participation within feature info requests.
- The transparency of the image background.
- If the coordinates are inverted for EPSG:4326
- The
{@link TLcdSLDStyledLayerDescriptor} styled layer descriptor.
- Parameters:
aWMSProxy- the WMS proxy object.- Returns:
- the WMS data source representation.
- Since:
- 2017.0
-
createFeatureInfoInputStream(TLcdWMSGetFeatureInfoContext, TLcdWMSGetFeatureInfoParameters)instead