Class DirectPosition1D

    • Field Detail

      • coordinate

        public double coordinate
        The coordinate value.
    • Constructor Detail

      • DirectPosition1D

        public DirectPosition1D()
        Constructs a position initialized to (0) with a null coordinate reference system.
      • DirectPosition1D

        public DirectPosition1D​(CoordinateReferenceSystem crs)
        Constructs a position with the specified coordinate reference system.
        crs - the coordinate reference system.
      • DirectPosition1D

        public DirectPosition1D​(double coordinate)
        Constructs a 1D position from the specified coordinate.
        coordinate - the coordinate value.
    • Method Detail

      • getDimension

        public final int getDimension()
        The length of coordinate sequence (the number of entries). This is always 1 for Direct­Position1D objects.
        Specified by:
        get­Dimension in interface Direct­Position
        the dimensionality of this position.
      • getCoordinateReferenceSystem

        public final CoordinateReferenceSystem getCoordinateReferenceSystem()
        Returns the coordinate reference system in which the coordinate is given. May be null if this particular Direct­Position is included in a larger object with such a reference to a CRS.
        Specified by:
        get­Coordinate­Reference­System in interface Direct­Position
        the coordinate reference system, or null.
      • setCoordinateReferenceSystem

        public void setCoordinateReferenceSystem​(CoordinateReferenceSystem crs)
        Sets the coordinate reference system in which the coordinate is given.
        crs - the new coordinate reference system, or null.
      • toString

        public String toString()
        Formats this position in the Well Known Text (WKT) format. The output is like below:
        The string returned by this method can be parsed by the Direct­Position1D constructor.
        to­String in class Abstract­Direct­Position
        this position as a POINT in Well Known Text (WKT) format.
      • clone

        public DirectPosition1D clone()
        Returns a copy of this position.
        clone in class Object
        a copy of this position.