Package org.locationtech.jts.geom
Class CoordinateXYZM
- java.lang.Object
-
- org.locationtech.jts.geom.Coordinate
-
- org.locationtech.jts.geom.CoordinateXYZM
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<Coordinate>
public class CoordinateXYZM extends Coordinate
Coordinate subclass supporting XYZM ordinate.This data object is suitable for use with coordinate sequences dimension 4, measures 1.
- Since:
- 1.16
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.locationtech.jts.geom.Coordinate
Coordinate.DimensionalComparator
-
-
Field Summary
-
Fields inherited from class org.locationtech.jts.geom.Coordinate
M, NULL_ORDINATE, x, X, y, Y, z, Z
-
-
Constructor Summary
Constructors Constructor Description CoordinateXYZM()Default constructorCoordinateXYZM(double x, double y, double z, double m)CoordinateXYZM(Coordinate coord)CoordinateXYZM(CoordinateXYZM coord)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateXYZMcopy()doublegetM()The m-measure, if available.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)The m-measure, if supported.voidsetOrdinate(int ordinateIndex, double value)Sets the ordinate for the given index to a given value.java.lang.StringtoString()Returns aStringof the form (x,y,z) .
-
-
-
Constructor Detail
-
CoordinateXYZM
public CoordinateXYZM()
Default constructor
-
CoordinateXYZM
public CoordinateXYZM(double x, double y, double z, double m)
-
CoordinateXYZM
public CoordinateXYZM(Coordinate coord)
-
CoordinateXYZM
public CoordinateXYZM(CoordinateXYZM coord)
-
-
Method Detail
-
copy
public CoordinateXYZM copy()
- Overrides:
copyin classCoordinate
-
getM
public double getM()
The m-measure, if available.- Overrides:
getMin classCoordinate
-
setM
public void setM(double m)
Description copied from class:CoordinateThe m-measure, if supported.- Overrides:
setMin classCoordinate
-
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
-
setCoordinate
public void setCoordinate(Coordinate other)
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
-
toString
public java.lang.String toString()
Description copied from class:CoordinateReturns aStringof the form (x,y,z) .- Overrides:
toStringin classCoordinate- Returns:
- a
Stringof the form (x,y,z)
-
-