Klasse Point

java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.Point
Alle implementierten Schnittstellen:
Serializable

@NonNullByDefault public class Point extends Geometry
Point geometry.
Autor:
Sebastian Baumhekel
Siehe auch:
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final int
    The OGIS geometry type number for points.

    Von Klasse geerbte Felder io.github.sebasbaumh.postgis.Geometry

    UNKNOWN_SRID
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Constructs an empty instance.
    Point(double x, double y)
    Constructs a new Point
    Point(double x, double y, double z)
    Constructs a new Point
    Point(double x, double y, double z, double m)
    Constructs a new Point
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
    Do some internal consistency checks on the geometry.
    boolean
    Checks it the coordinates of the given Point are equal to this Point.
    Creates a copy of this Point.
    double
    Calculates the distance to the given Point.
    boolean
    equals(Object other)
    java.lang.Object equals implementation
    Gets the coordinates of this Geometry.
    double
    Gets the measurement.
    int
    Gets the number of coordinates of this Geometry.
    double
    Gets the X-coordinate.
    double
    Gets the Y-coordinate.
    double
    Gets the Z-coordinate.
    int
     
    boolean
    Returns whether we have a measure (4th dimension)
    boolean
    Checks if this Geometry is 3d.
    boolean
    Ist this Geometry empty, so does it contain no coordinates or other geometries?
    void
    setM(double m)
    Sets the measurement.
    void
    setX(double x)
    Sets the X-coordinate.
    void
    setY(double y)
    Sets the Y-coordinate.
    void
    setZ(double z)
    Sets the Z-coordinate.
    Gets this Point as a 2d object.
     

    Von Klasse geerbte Methoden io.github.sebasbaumh.postgis.Geometry

    getSrid, getType, setSrid

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Felddetails

    • TYPE

      public static final int TYPE
      The OGIS geometry type number for points.
      Siehe auch:
  • Konstruktordetails

    • Point

      public Point()
      Constructs an empty instance.
    • Point

      public Point(double x, double y)
      Constructs a new Point
      Parameter:
      x - the longitude / x ordinate
      y - the latitude / y ordinate
    • Point

      public Point(double x, double y, double z)
      Constructs a new Point
      Parameter:
      x - the longitude / x ordinate
      y - the latitude / y ordinate
      z - the radius / height / elevation / z ordinate (can be Double.NaN for no coordinate)
    • Point

      public Point(double x, double y, double z, double m)
      Constructs a new Point
      Parameter:
      x - the longitude / x ordinate
      y - the latitude / y ordinate
      z - the radius / height / elevation / z ordinate (can be Double.NaN for no coordinate)
      m - measure (4th dimension)
  • Methodendetails

    • checkConsistency

      public boolean checkConsistency()
      Beschreibung aus Klasse kopiert: Geometry
      Do some internal consistency checks on the geometry. Currently, all Geometries must have a valid dimension (2 or 3) and a valid type. Composed geometries must have all equal SRID, dimensionality and measures, as well as that they do not contain NULL or inconsistent subgeometries. BinaryParser and WKTParser should only generate consistent geometries. BinaryWriter may produce invalid results on inconsistent geometries.
      Setzt außer Kraft:
      checkConsistency in Klasse Geometry
      Gibt zurück:
      true if all checks are passed.
    • coordsAreEqual

      public boolean coordsAreEqual(Point other)
      Checks it the coordinates of the given Point are equal to this Point.
      Parameter:
      other - Point
      Gibt zurück:
      true on success, else false
    • copy

      public Point copy()
      Creates a copy of this Point.
      Gibt zurück:
      Point
    • distance

      public double distance(Point p)
      Calculates the distance to the given Point.
      Parameter:
      p - Point
      Gibt zurück:
      distance
    • equals

      public boolean equals(@Nullable Object other)
      Beschreibung aus Klasse kopiert: Geometry
      java.lang.Object equals implementation
      Setzt außer Kraft:
      equals in Klasse Geometry
      Parameter:
      other - geometry to compare
      Gibt zurück:
      true if equal, false otherwise
    • getCoordinates

      public Iterable<Point> getCoordinates()
      Beschreibung aus Klasse kopiert: Geometry
      Gets the coordinates of this Geometry.
      Angegeben von:
      getCoordinates in Klasse Geometry
      Gibt zurück:
      coordinates
    • getM

      public double getM()
      Gets the measurement.
      Gibt zurück:
      measurement on success, else Double.NaN
    • getNumberOfCoordinates

      public int getNumberOfCoordinates()
      Beschreibung aus Klasse kopiert: Geometry
      Gets the number of coordinates of this Geometry.
      Angegeben von:
      getNumberOfCoordinates in Klasse Geometry
      Gibt zurück:
      number of coordinates
    • getX

      public double getX()
      Gets the X-coordinate.
      Gibt zurück:
      X-coordinate on success, else Double.NaN
    • getY

      public double getY()
      Gets the Y-coordinate.
      Gibt zurück:
      Y-coordinate on success, else Double.NaN
    • getZ

      public double getZ()
      Gets the Z-coordinate.
      Gibt zurück:
      Z-coordinate on success, else Double.NaN
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Geometry
    • hasMeasure

      public boolean hasMeasure()
      Beschreibung aus Klasse kopiert: Geometry
      Returns whether we have a measure (4th dimension)
      Angegeben von:
      hasMeasure in Klasse Geometry
      Gibt zurück:
      true if the geometry has a measure, false otherwise
    • is3d

      public boolean is3d()
      Beschreibung aus Klasse kopiert: Geometry
      Checks if this Geometry is 3d.
      Angegeben von:
      is3d in Klasse Geometry
      Gibt zurück:
      true on success, else false
    • isEmpty

      public boolean isEmpty()
      Beschreibung aus Klasse kopiert: Geometry
      Ist this Geometry empty, so does it contain no coordinates or other geometries?
      Angegeben von:
      isEmpty in Klasse Geometry
      Gibt zurück:
      true on success, else false
    • setM

      public void setM(double m)
      Sets the measurement.
      Parameter:
      m - measurement
    • setX

      public void setX(double x)
      Sets the X-coordinate.
      Parameter:
      x - X-coordinate
    • setY

      public void setY(double y)
      Sets the Y-coordinate.
      Parameter:
      y - Y-coordinate
    • setZ

      public void setZ(double z)
      Sets the Z-coordinate.
      Parameter:
      z - Z-coordinate
    • to2d

      public Point to2d()
      Gets this Point as a 2d object.
      Gibt zurück:
      Point
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object