Class WmsLayer

  • All Implemented Interfaces:
    Layer, java.lang.Iterable<Renderable>
    Direct Known Subclasses:
    BlueMarbleLayer, LandsatLayer

    public class WmsLayer
    extends RenderableLayer
    Displays imagery from OGC Web Map Service (WMS) layers.
    WMSLayer's configuration may be specified at construction or by calling setConfiguration, and must include the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
    WmsLayer defaults to retrieving imagery in the PNG format. This may be configured by calling setImageFormat.
    • Constructor Detail

      • WmsLayer

        public WmsLayer()
        Constructs an empty Web Map Service (WMS) layer that displays nothing.
      • WmsLayer

        public WmsLayer​(Sector sector,
                        double metersPerPixel,
                        WmsLayerConfig config)
        Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
        Parameters:
        sector - the geographic region in which to display the WMS layer
        metersPerPixel - the desired resolution in meters on Earth
        config - the WMS layer configuration values
        Throws:
        java.lang.IllegalArgumentException - If any argument is null, if the resolution is not positive, or if any configuration value is invalid
      • WmsLayer

        public WmsLayer​(Sector sector,
                        Globe globe,
                        double metersPerPixel,
                        WmsLayerConfig config)
        Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
        Parameters:
        sector - the geographic region in which to display the WMS layer
        metersPerPixel - the desired resolution in meters on the specified globe
        config - the WMS layer configuration values
        Throws:
        java.lang.IllegalArgumentException - If any argument is null, if the resolution is not positive, or if any configuration value is invalid
    • Method Detail

      • setConfiguration

        public void setConfiguration​(Sector sector,
                                     double metersPerPixel,
                                     WmsLayerConfig config)
        Specifies this Web Map Service (WMS) layer's configuration. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
        Parameters:
        sector - the geographic region in which to display the WMS layer
        metersPerPixel - the desired resolution in meters on Earth
        config - the WMS layer configuration values
      • setConfiguration

        public void setConfiguration​(Sector sector,
                                     Globe globe,
                                     double metersPerPixel,
                                     WmsLayerConfig config)
        Specifies this Web Map Service (WMS) layer's configuration. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
        Parameters:
        sector - the geographic region in which to display the WMS layer
        metersPerPixel - the desired resolution in meters on the specified globe
        config - the WMS layer configuration values