CoordinateXYZM class
Coordinate subclass supporting XYZM ordinates.
This data object is suitable for use with coordinate sequences with dimension = 4 and measures = 1.
@since 1.16
- Inheritance
-
- Object
- Coordinate
- CoordinateXYZM
Constructors
- CoordinateXYZM(double x, double y, double z, double m)
- Constructs a CoordinateXYZM instance with the given ordinates and measure.
- CoordinateXYZM.empty()
- Default constructor
- CoordinateXYZM.fromCoordinate(Coordinate coord)
- Constructs a CoordinateXYZM instance with the ordinates of the given Coordinate.
- CoordinateXYZM.fromCoordinateXYZM(CoordinateXYZM coord)
- Constructs a CoordinateXYZM instance with the ordinates of the given CoordinateXYZM.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- m ↔ double
-
The m-measure.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- x ↔ double
-
The x-ordinate.
getter/setter pairinherited
- y ↔ double
-
The y-ordinate.
getter/setter pairinherited
- z ↔ double
-
The z-ordinate.
getter/setter pairinherited
Methods
-
clone(
) → Object -
inherited
-
compareTo(
Coordinate other) → int -
Compares this {@link Coordinate} with the specified {@link Coordinate} for order.
This method ignores the z value when making the comparison.
Returns:
inherited
-
copy(
) → CoordinateXYZM -
Creates a copy of this CoordinateXYZM.
override
-
distance(
Coordinate c) → double -
Computes the 2-dimensional Euclidean distance to another location.
The Z-ordinate is ignored.
inherited
-
distance3D(
Coordinate c) → double -
Computes the 3-dimensional Euclidean distance to another location.
inherited
-
equalInZ(
Coordinate c, double tolerance) → bool -
Tests if another coordinate has the same value for Z, within a tolerance.
inherited
-
equals(
Object other) → bool -
Returns
true
ifother
has the same values for the x and y ordinates. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison.inherited -
equals2D(
Coordinate other) → bool -
Returns whether the planar projections of the two
Coordinate
s are equal.inherited -
equals2DWithTolerance(
Coordinate c, double tolerance) → bool -
Tests if another Coordinate has the same values for the X and Y ordinates,
within a specified tolerance value.
The Z ordinate is ignored.
inherited
-
equals3D(
Coordinate other) → bool -
Tests if another coordinate has the same values for the X, Y and Z ordinates.
inherited
-
getM(
) → double -
The m-measure, if available.
override
-
getOrdinate(
int ordinateIndex) → double -
Gets the ordinate value for the given index.
override
-
getX(
) → double -
Retrieves the value of the X ordinate.
inherited
-
getY(
) → double -
Retrieves the value of the Y ordinate.
inherited
-
getZ(
) → double -
Retrieves the value of the Z ordinate, if present.
If no Z value is present returns NaN.
inherited
-
isValid(
) → bool -
Tests if the coordinate has valid X and Y ordinate values.
An ordinate value is valid iff it is finite.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCoordinate(
Coordinate other) → void -
Sets this
Coordinate
s (x,y,z) values to that ofother
.override -
setM(
double m) → void -
Sets the measure value, if supported.
override
-
setOrdinate(
int ordinateIndex, double value) → void -
Sets the ordinate for the given index
to a given value.
override
-
setX(
double x) → void -
Sets the X ordinate value.
inherited
-
setY(
double y) → void -
Sets the Y ordinate value.
inherited
-
setZ(
double z) → void -
Sets the Z ordinate value.
inherited
-
toString(
) → String -
Returns a
String
of the form (x,y,z) .override
Operators
-
operator +(
Coordinate other) → Coordinate -
Returns the (vector-) sum of this and
other
.inherited -
operator -(
Coordinate other) → Coordinate -
inherited
-
operator ==(
Object o) → bool -
The equality operator.
inherited