Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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
        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 factory
        uri - the URI, including the parameters
        method - the HTTP method
        Returns:
        The request
        Throws:
        java.io.IOException