Class WMSTiledImageLayer

    • Constructor Detail

      • WMSTiledImageLayer

        public WMSTiledImageLayer​(AVList params)
      • WMSTiledImageLayer

        public WMSTiledImageLayer​(org.w3c.dom.Document dom,
                                  AVList params)
      • WMSTiledImageLayer

        public WMSTiledImageLayer​(org.w3c.dom.Element domElement,
                                  AVList params)
      • WMSTiledImageLayer

        public WMSTiledImageLayer​(java.lang.String stateInXml)
    • Method Detail

      • wmsGetParamsFromDocument

        protected static AVList wmsGetParamsFromDocument​(org.w3c.dom.Element domElement,
                                                         AVList params)
        Extracts parameters necessary to configure the layer from an XML DOM element.
        Parameters:
        domElement - the element to search for parameters.
        params - an attribute-value list in which to place the extracted parameters. May be null, in which case a new attribue-value list is created and returned.
        Returns:
        the attribute-value list passed as the second parameter, or the list created if the second parameter is null.
        Throws:
        java.lang.IllegalArgumentException - if the DOM element is null.
      • wmsGetParamsFromCapsDoc

        public static AVList wmsGetParamsFromCapsDoc​(WMSCapabilities caps,
                                                     AVList params)
        Extracts parameters necessary to configure the layer from a WMS capabilities document.
        Parameters:
        caps - the capabilities document.
        params - an attribute-value list in which to place the extracted parameters. May be null, in which case a new attribute-value list is created and returned.
        Returns:
        the attribute-value list passed as the second parameter, or the list created if the second parameter is null.
        Throws:
        java.lang.IllegalArgumentException - if the capabilities document reference is null.
      • composeImageForSector

        public java.awt.image.BufferedImage composeImageForSector​(Sector sector,
                                                                  int canvasWidth,
                                                                  int canvasHeight,
                                                                  double aspectRatio,
                                                                  int levelNumber,
                                                                  java.lang.String mimeType,
                                                                  boolean abortOnError,
                                                                  java.awt.image.BufferedImage image,
                                                                  int timeout)
                                                           throws java.lang.Exception
        Description copied from class: TiledImageLayer
        Create an image for the portion of this layer lying within a specified sector.The image is created at a specified aspect ratio within a canvas of a specified size. This returns the specified image if this layer has no content in the specified sector.
        Overrides:
        composeImageForSector in class TiledImageLayer
        Parameters:
        sector - the sector of interest.
        canvasWidth - the width of the canvas.
        canvasHeight - the height of the canvas.
        aspectRatio - the aspect ratio, width/height, of the window. If the aspect ratio is greater or equal to one, the full width of the canvas is used for the image; the height used is proportional to the inverse of the aspect ratio. If the aspect ratio is less than one, the full height of the canvas is used, and the width used is proportional to the aspect ratio.
        levelNumber - the target level of the tiled image layer.
        mimeType - the type of image to create, e.g., "png" and "jpg".
        abortOnError - indicates whether to stop assembling the image if an error occurs. If false, processing continues until all portions of the layer that intersect the specified sector have been added to the image. Portions for which an error occurs will be blank.
        image - if non-null, a BufferedImage in which to place the image. If null, a new buffered image is created. The image must be the width and height specified in the canvasWidth and canvasHeight arguments.
        timeout - The amount of time to allow for reading the image from the server.
        Returns:
        image the assembled image, of size indicated by the canvasWidth and canvasHeight. If the specified aspect ratio is one, all pixels contain values. If the aspect ratio is greater than one, a full-width segment along the top of the canvas is blank. If the aspect ratio is less than one, a full-height segment along the right side of the canvase is blank. If the image argument was non-null, that buffered image is returned.
        Throws:
        java.lang.IllegalArgumentException - if sector is null.
        java.lang.Exception - Other errors.
        See Also:
        ;
      • createConfigurationDocument

        protected org.w3c.dom.Document createConfigurationDocument​(AVList params)
        Appends WMS tiled image layer configuration elements to the superclass configuration document.
        Overrides:
        createConfigurationDocument in class BasicTiledImageLayer
        Parameters:
        params - configuration parameters describing this WMS tiled image layer.
        Returns:
        a WMS tiled image layer configuration document.
      • wmsRestorableStateToParams

        public static AVList wmsRestorableStateToParams​(java.lang.String stateInXml)
        Creates an attribute-value list from an xml document containing restorable state for this layer.
        Parameters:
        stateInXml - an xml document specified in a String.
        Returns:
        an attribute-value list containing the parameters in the specified restorable state.
        Throws:
        java.lang.IllegalArgumentException - if the state reference is null.