Package mil.nga.sf

Class Point

  • All Implemented Interfaces:
    Serializable

    public class Point
    extends Geometry
    A single location in space. Each point has an X and Y coordinate. A point MAY optionally also have a Z and/or an M value.
    Author:
    osbornb
    See Also:
    Serialized Form
    • Constructor Detail

      • Point

        public Point()
        Constructor
      • Point

        public Point​(double x,
                     double y)
        Constructor
        Parameters:
        x - x coordinate
        y - y coordinate
      • Point

        public Point​(double x,
                     double y,
                     Double z)
        Constructor
        Parameters:
        x - x coordinate
        y - y coordinate
        z - z coordinate
      • Point

        public Point​(double x,
                     double y,
                     Double z,
                     Double m)
        Constructor
        Parameters:
        x - x coordinate
        y - y coordinate
        z - z coordinate
        m - m coordinate
      • Point

        public Point​(boolean hasZ,
                     boolean hasM,
                     double x,
                     double y)
        Constructor
        Parameters:
        hasZ - has z
        hasM - has m
        x - x coordinate
        y - y coordinate
      • Point

        public Point​(Point point)
        Copy Constructor
        Parameters:
        point - point to copy
    • Method Detail

      • getX

        public double getX()
        Get x
        Returns:
        x
      • setX

        public void setX​(double x)
        Set x
        Parameters:
        x - x coordinate
      • getY

        public double getY()
        Get y
        Returns:
        y
      • setY

        public void setY​(double y)
        Set y
        Parameters:
        y - y coordinate
      • getZ

        public Double getZ()
        Get z
        Returns:
        z
      • setZ

        public void setZ​(Double z)
        Set z
        Parameters:
        z - z coordinate
      • getM

        public Double getM()
        Get m
        Returns:
        m
      • setM

        public void setM​(Double m)
        Set m
        Parameters:
        m - m coordinate
      • copy

        public Geometry copy()
        Copy the geometry
        Specified by:
        copy in class Geometry
        Returns:
        geometry copy
      • isEmpty

        public boolean isEmpty()
        Is the Geometry empty
        Specified by:
        isEmpty in class Geometry
        Returns:
        true if empty
      • isSimple

        public boolean isSimple()
        Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency
        Specified by:
        isSimple in class Geometry
        Returns:
        true if simple
      • equalsX

        public boolean equalsX​(Point point)
        Indicates if x values are equal
        Parameters:
        point - point to compare
        Returns:
        true if x is equal
        Since:
        2.2.1
      • equalsY

        public boolean equalsY​(Point point)
        Indicates if y values are equal
        Parameters:
        point - point to compare
        Returns:
        true if y is equal
        Since:
        2.2.1
      • equalsXY

        public boolean equalsXY​(Point point)
        Indicates if x and y values are equal
        Parameters:
        point - point to compare
        Returns:
        true if x and y are equal
        Since:
        2.2.1