PTV WMS Adapter Configuration

The configuration file wms.properties contains all necessary parameters for configuring the PTV WMS Adapter. wms.properties can be found in your PTV xServer's conf folder and contains some basic WMS layer definitions by default. Sample:


layers=xmap-plain
 
xmap-plain.type=com.ptvag.wms.XMapRenderingLayer
xmap-plain.description=Get a standard map from the xMap server
xmap-plain.url=http://localhost:50010/xmap/ws/XMap
xmap-plain.template=<?xml version="1.0" encoding="utf-8"?><soap:Envelope ...
xmap-plain.clipRect=-19900000,18600000,19900000,-7300000
xmap-plain.allowTransparency=false


Layers to be made available by the PTV WMS Adapter are listed in the layers key. This key holds one or more layer names, separated by ",":


layers=<layer 1>,<layer 2>,...<layer n>


Each layer listed in the layers key is configured using several subkeys, depending on the layer type used. Currently, the following types are supported:


TypeDescription
com.ptvag.wms.XMapRenderingLayerRenderer that redirects WMS requests to PTV xMap Server, using a specific request template.
com.ptvag.wms.CombinedLayerRenderer that combines two or more other layers into one single layer.

Configuration keys of the different layer types:


<layer-name>.type = com.ptvag.wms.XMapRenderingLayer
 
KeyDescription
<layer-name>.description Textual layer description, returned in a GetCapabilities response. For details about GetCapabilities, please refer to the WMS specification.
<layer-name>.url Url where to redirect WMS requests to. Example: http://localhost:50010/xmap/ws/XMap
<layer-name>.template Template of a PTV xMap Server SOAP request that is used for redirection. This template contains certain placeholders that are replaced by the PTV WMS Adapter when requesting a map:
 
  • ${width}, ${height}
    image width and height
     
  • ${format}
    PTV xMap Server image format, corresponding to the forma specified in the WMS request
     
  • ${left}, ${top}, ${right}, ${bottom}
    Bounding box of the map section, corresponding to the bbox argument of the WMS request.
     
    Please note that com.ptvag.wms.XMapRenderingLayer uses PTV_MERCATOR, no matter what has been specified in the WMS request. Necessary transformations are handled by the PTV WMS Adapter.
     
  • ${imageId}
    Uniquely identifies requests within one single PTV WMS Adapter instance. Used for logging purposes; not persisted, initializes to zero when the PTV WMS Adapter starts.
     
Using the given placeholders, a request template might look as follows:
(for the sake of readability, XML has been pretty-printed)
 

 
Using templates, it is possible to modify requests in every imaginable way - e.g. hiding layers, changing layer details or adding additional content like POIs. Please refer to the PTV xMap Server documentation for more information about available request elements.
<layer-name>.clipRect Specifies an optional rectangle (PTV_MERCATOR) against which rendered maps are clipped. By default, no clipping is performed.
 
Format: <left>,<top>,<right>,<bottom>
Example: -19900000,18600000,19900000,-7300000
<layer-name>.allowTransparency Optional, specifies if the "transparent" parameter of the WMS Request is processed or simply ignored. Defaults to true, meaning "apply transparency, if requested".
 
Please note that the PTV WMS Adapter simply renders the most frequent color of a map image transparent, if transparency has been requested.
<layer-name>.cacheTransparentColor Optional, specifies, when <layer-name>.allowTransparency is set to true, if the transparent color is to be cached or if it should be determined with every WMS request. Defaults to false, color is not cached by default.
<layer-name>.bleeding Optional, specifies an additional, internal image buffer (in px) to workaround object cropping on stitched maps. Defaults to 0.
<layer-name>.maxHttpConnections Optional, specifies the maximum number of connections opened to the backend. Used for com.ptvag.wms.XMapRenderingLayer only. Defaults to 10 and is usually set to the number of backend modules or the server's queue size at the max. If set to a higher value, the number of overloads reported back to the WMS client may increase on high loads.

 
<layer-name>.type = com.ptvag.wms.CombinedLayer
 
KeyDescription
<layer-name>.description Textual layer description, returned in a GetCapabilities response. For details about GetCapabilities, please refer to the WMS specification.
<layer-name>.layers List of (WMS) layer names to combine into one single layer.
 
Format: <layer 1>,<layer 2>,...<layer n>