Class ExtendedCoordinate
java.lang.Object
org.locationtech.jts.geom.Coordinate
org.locationtech.jtsexample.geom.ExtendedCoordinate
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Coordinate>
- Version:
- 1.7
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Coordinate
Coordinate.DimensionalComparator -
Field Summary
Fields inherited from class Coordinate
M, NULL_ORDINATE, x, X, y, Y, z, Z -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorExtendedCoordinate(double x, double y, double z, double m) ExtendedCoordinate(Coordinate coord) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this Coordinate.doublegetM()Retrieves the value of the measure, if present.doublegetOrdinate(int ordinateIndex) Gets the ordinate value for the given index.voidsetCoordinate(Coordinate other) Sets thisCoordinates (x,y,z) values to that ofother.voidsetM(double m) Sets the measure value, if supported.voidsetOrdinate(int ordinateIndex, double value) Sets the ordinate for the given index to a given value.toString()Returns aStringof the form (x,y,z) .
-
Constructor Details
-
ExtendedCoordinate
public ExtendedCoordinate()Default constructor -
ExtendedCoordinate
public ExtendedCoordinate(double x, double y, double z, double m) -
ExtendedCoordinate
-
ExtendedCoordinate
-
-
Method Details
-
copy
Description copied from class:CoordinateCreates a copy of this Coordinate.- Overrides:
copyin classCoordinate- Returns:
- a copy of this coordinate.
-
getM
public double getM()Description copied from class:CoordinateRetrieves the value of the measure, if present. If no measure value is present returns NaN.- Overrides:
getMin classCoordinate- Returns:
- the value of the measure, or NaN
-
setM
public void setM(double m) Description copied from class:CoordinateSets the measure value, if supported.- Overrides:
setMin classCoordinate- Parameters:
m- the value to set as M
-
setCoordinate
Description copied from class:CoordinateSets thisCoordinates (x,y,z) values to that ofother.- Overrides:
setCoordinatein classCoordinate- Parameters:
other- theCoordinateto copy
-
setOrdinate
public void setOrdinate(int ordinateIndex, double value) Description copied from class:CoordinateSets the ordinate for the given index to a given value. The base implementation supported values for the index areCoordinate.X,Coordinate.Y, andCoordinate.Z.- Overrides:
setOrdinatein classCoordinate- Parameters:
ordinateIndex- the ordinate indexvalue- the value to set
-
getOrdinate
public double getOrdinate(int ordinateIndex) Description copied from class:CoordinateGets the ordinate value for the given index. The base implementation supports values for the index areCoordinate.X,Coordinate.Y, andCoordinate.Z.- Overrides:
getOrdinatein classCoordinate- Parameters:
ordinateIndex- the ordinate index- Returns:
- the value of the ordinate
-
toString
Description copied from class:CoordinateReturns aStringof the form (x,y,z) .- Overrides:
toStringin classCoordinate- Returns:
- a
Stringof the form (x,y,z)
-