Interface ExternalGraphic

  • All Superinterfaces:
    GraphicalSymbol, Symbol
    All Known Implementing Classes:
    ExternalGraphicImpl

    public interface ExternalGraphic
    extends GraphicalSymbol, Symbol
    Points to an external file that contains an image of some kind, such as a CGM, JPG, or SVG.
    Since:
    GeoAPI 2.2
    Author:
    Open Geospatial Consortium, Johann Sorel (Geomatys), Chris Dillard (SYS Technologies)
    • Field Detail

      • EXTERNAL_GRAPHICS_EMPTY

        static final ExternalGraphic[] EXTERNAL_GRAPHICS_EMPTY
    • Method Detail

      • getOnlineResource

        OnLineResource getOnlineResource()
        Returns a OnlineResource to a file (perhaps a local file) that contains an image. This can be null if the image is already loaded locally and the InlineContent property is set.
        Returns:
        OnlineResource
      • getInlineContent

        Icon getInlineContent()
        Returns the InlineContent that comprise the image. This overrides the OnlineResource property, if it is set.
      • getFormat

        String getFormat()
        Returns the mime type of the onlineResource/InlineContent
        Returns:
        mime type
      • getColorReplacements

        Collection<ColorReplacement> getColorReplacements()
        The ColorReplacement element, which may occur multiple times, allows to replace a color in the ExternalGraphic, the color specified in the OriginalColor sub-element, by another color as a result of a recode function as defined in Interpolate .
      • setURI

        void setURI​(String uri)
        Converts a URI in a string to the location URL
        Parameters:
        uri - the uri of the external graphic
      • getURI

        String getURI()
        Returns the un-parsed URI for the mark (useful if the uri is using transformations or relative locations)
      • getLocation

        URL getLocation()
                 throws MalformedURLException
        Provides the URL for where the external graphic resource can be located.

        This method will be replaced by getOnlineResource().getLinkage() in 2.6.x

        Returns:
        The URL of the ExternalGraphic
        Throws:
        MalformedURLException - If the url held in the ExternalGraphic is malformed.
      • setLocation

        void setLocation​(URL url)
        Provides the URL for where the external graphic resource can be located.
        Parameters:
        url - The URL of the ExternalGraphic
      • setFormat

        void setFormat​(String format)
        Provides the format of the external graphic.
        Parameters:
        format - The format of the external graphic. Reported as its MIME type in a String object.
      • setCustomProperties

        void setCustomProperties​(Map<String,​Object> properties)
        Custom properties; renderer may consult these values when drawing graphic.
      • getCustomProperties

        Map<String,​Object> getCustomProperties()
        Custom user supplied properties available when working with an external graphic.
        Returns:
        properties