Package org.mapfish.print.map.image.wms
Class WmsUtilities
- java.lang.Object
-
- org.mapfish.print.map.image.wms.WmsUtilities
-
public final class WmsUtilities extends java.lang.Object
A few methods to help make wms requests for all types of wms layers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.springframework.http.client.ClientHttpRequest
createWmsRequest(MfClientHttpRequestFactory httpRequestFactory, java.net.URI uri, org.springframework.http.HttpMethod method)
Create a WMS request putting the params in the URL (GET) or in the body (POST).static java.net.URI
makeWmsGetLayerRequest(WmsLayerParam wmsLayerParam, java.net.URI commonURI, java.awt.Dimension imageSize, double dpi, double angle, org.geotools.geometry.jts.ReferencedEnvelope bounds)
Make a WMS getLayer request and return the image read from the server.
-
-
-
Method Detail
-
makeWmsGetLayerRequest
public static java.net.URI makeWmsGetLayerRequest(WmsLayerParam wmsLayerParam, java.net.URI commonURI, java.awt.Dimension imageSize, double dpi, double angle, org.geotools.geometry.jts.ReferencedEnvelope bounds) throws org.geotools.api.referencing.FactoryException, java.net.URISyntaxException, java.io.IOException
Make a WMS getLayer request and return the image read from the server.- Parameters:
wmsLayerParam
- the wms request parameterscommonURI
- the uri to use for the requests (excepting parameters of course.)imageSize
- the size of the image to requestdpi
- the dpi of the image to requestangle
- the angle of the image to requestbounds
- the area and projection of the request on the world.- Throws:
org.geotools.api.referencing.FactoryException
java.net.URISyntaxException
java.io.IOException
-
createWmsRequest
public static org.springframework.http.client.ClientHttpRequest createWmsRequest(MfClientHttpRequestFactory httpRequestFactory, java.net.URI uri, org.springframework.http.HttpMethod method) throws java.io.IOException
Create a WMS request putting the params in the URL (GET) or in the body (POST).- Parameters:
httpRequestFactory
- the request factoryuri
- the URI, including the parametersmethod
- the HTTP method- Returns:
- The request
- Throws:
java.io.IOException
-
-