Class WmsUtilities

java.lang.Object
org.mapfish.print.map.image.wms.WmsUtilities

public final class WmsUtilities extends Object
A few methods to help make wms requests for all types of wms layers.
  • Method Details

    • makeWmsGetLayerRequest

      public static URI makeWmsGetLayerRequest(WmsLayerParam wmsLayerParam, URI commonURI, Dimension imageSize, double dpi, double angle, org.geotools.geometry.jts.ReferencedEnvelope bounds) throws org.geotools.api.referencing.FactoryException, URISyntaxException, IOException
      Make a WMS getLayer request and return the image read from the server.
      Parameters:
      wmsLayerParam - the wms request parameters
      commonURI - the uri to use for the requests (excepting parameters of course.)
      imageSize - the size of the image to request
      dpi - the dpi of the image to request
      angle - the angle of the image to request
      bounds - the area and projection of the request on the world.
      Throws:
      org.geotools.api.referencing.FactoryException
      URISyntaxException
      IOException
    • createWmsRequest

      public static org.springframework.http.client.ClientHttpRequest createWmsRequest(MfClientHttpRequestFactory httpRequestFactory, URI uri, org.springframework.http.HttpMethod method) throws IOException
      Create a WMS request putting the params in the URL (GET) or in the body (POST).
      Parameters:
      httpRequestFactory - the request factory
      uri - the URI, including the parameters
      method - the HTTP method
      Returns:
      The request
      Throws:
      IOException