Class KmlImageCoordinate


  • public final class KmlImageCoordinate
    extends java.lang.Object
    A KML image coordinate system.

    According to the OGC 2.3 specification in section 16.26.2 (http://docs.opengeospatial.org/is/12-007r2/12-007r2.html#1254) "Specifies an image coordinate system. The x and y values may each be specified in three different ways - as pixels (pixels), as fractions of the icon (fraction), or as inset pixels (insetPixels), which is an offset in pixels from the upper right corner of the icon. They may or may not be specified in a consistent manner - for example, x can be specified in pixels and y as a fraction."

    Use the KmlUnitsType enumeration (either via getXUnits() and getYUnits() or via the KmlImageCoordinate(double, double, KmlUnitsType, KmlUnitsType) constructor) to establish the KML image coordinate system. The KmlUnitsType.PIXELS and KmlUnitsType.INSET_PIXELS image coordinate systems are defined with device-independent pixels (dips).

    Since:
    100.6.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getX()
      Gets the x component of a point on the screen.
      KmlUnitsType getXUnits()
      The units in which the x value is specified.
      double getY()
      Gets the y component of a point on the screen.
      KmlUnitsType getYUnits()
      The units in which the y value is specified.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KmlImageCoordinate

        public KmlImageCoordinate​(double x,
                                  double y,
                                  KmlUnitsType xUnitsType,
                                  KmlUnitsType yUnitsType)
        Constructs a KmlImageCoordinate.
        Parameters:
        x - x component of a point on the screen. Default is 0.5.
        y - y component of a point on the screen. Default is 0.5.
        xUnitsType - units in which the x value is specified. Default is KmlUnitsType.FRACTION.
        yUnitsType - units in which the y value is specified. Default is KmlUnitsType.FRACTION.
        Throws:
        java.lang.IllegalArgumentException - if xUnitsType or yUnitsType is null
        Since:
        100.6.0
    • Method Detail

      • getX

        public double getX()
        Gets the x component of a point on the screen.
        Returns:
        x component of a point on the screen
        Since:
        100.6.0
      • getY

        public double getY()
        Gets the y component of a point on the screen.
        Returns:
        y component of a point on the screen
        Since:
        100.6.0
      • getXUnits

        public KmlUnitsType getXUnits()
        The units in which the x value is specified.
        Returns:
        a KmlUnitsType
        Since:
        100.6.0
      • getYUnits

        public KmlUnitsType getYUnits()
        The units in which the y value is specified.
        Returns:
        a KmlUnitsType
        Since:
        100.6.0