public class ProjCoordinate
extends java.lang.Object
CoordinateReferenceSystem
.
The coordinate is defined via X, Y, and optional Z ordinates.
Provides utility methods for comparing the ordinates of two positions and
for creating positions from Strings/storing positions as strings.
The primary use of this class is to represent coordinate
values which are to be transformed
by a CoordinateTransform
.
修飾子とタイプ | フィールドと説明 |
---|---|
static java.text.DecimalFormat |
DECIMAL_FORMAT |
static java.lang.String |
DECIMAL_FORMAT_PATTERN |
double |
x
The X ordinate for this point.
|
double |
y
The Y ordinate for this point.
|
double |
z
The Z ordinate for this point.
|
コンストラクタと説明 |
---|
ProjCoordinate()
Creates a ProjCoordinate with default ordinate values.
|
ProjCoordinate(double argX,
double argY)
Creates a ProjCoordinate using the provided double parameters.
|
ProjCoordinate(double argX,
double argY,
double argZ)
Creates a ProjCoordinate using the provided double parameters.
|
ProjCoordinate(java.lang.String argToParse)
Create a ProjCoordinate by parsing a String in the same format as returned
by the toString method defined by this class.
|
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
areXOrdinatesEqual(ProjCoordinate argToCompare,
double argTolerance)
Returns a boolean indicating if the X ordinate value of the
ProjCoordinate provided as an ordinate is equal to the X ordinate
value of this ProjCoordinate.
|
boolean |
areYOrdinatesEqual(ProjCoordinate argToCompare,
double argTolerance)
Returns a boolean indicating if the Y ordinate value of the
ProjCoordinate provided as an ordinate is equal to the Y ordinate
value of this ProjCoordinate.
|
boolean |
areZOrdinatesEqual(ProjCoordinate argToCompare,
double argTolerance)
Returns a boolean indicating if the Z ordinate value of the
ProjCoordinate provided as an ordinate is equal to the Z ordinate
value of this ProjCoordinate.
|
void |
clearZ() |
boolean |
equals(java.lang.Object other) |
int |
hashCode()
Gets a hashcode for this coordinate.
|
boolean |
hasValidXandYOrdinates()
Indicates if this ProjCoordinate has valid X ordinate and Y ordinate
values.
|
boolean |
hasValidZOrdinate() |
void |
setValue(double x,
double y)
Sets the value of this coordinate to
be equal to the given ordinates.
|
void |
setValue(double x,
double y,
double z)
Sets the value of this coordinate to
be equal to the given ordinates.
|
void |
setValue(ProjCoordinate p)
Sets the value of this coordinate to
be equal to the given coordinate's ordinates.
|
java.lang.String |
toShortString()
Returns a string representing the ProjPoint in the format:
[X Y]
or [X, Y, Z].
|
java.lang.String |
toString()
Returns a string representing the ProjPoint in the format:
ProjCoordinate[X Y Z].
|
public static java.lang.String DECIMAL_FORMAT_PATTERN
public static java.text.DecimalFormat DECIMAL_FORMAT
public double x
Note: This member variable can be accessed directly. In the future this direct access should be replaced with getter and setter methods. This will require refactoring of the Proj4J code base.
public double y
Note: This member variable can be accessed directly. In the future this direct access should be replaced with getter and setter methods. This will require refactoring of the Proj4J code base.
public double z
Note: This member variable can be accessed directly. In the future this direct access should be replaced with getter and setter methods. This will require refactoring of the Proj4J code base.
public ProjCoordinate()
public ProjCoordinate(double argX, double argY, double argZ)
public ProjCoordinate(double argX, double argY)
public ProjCoordinate(java.lang.String argToParse)
argToParse
- the string to parsepublic void setValue(ProjCoordinate p)
p
- the coordinate to copypublic void setValue(double x, double y)
x
- the x ordinatey
- the y ordinatepublic void setValue(double x, double y, double z)
x
- the x ordinatey
- the y ordinatez
- the z ordinatepublic void clearZ()
public boolean areXOrdinatesEqual(ProjCoordinate argToCompare, double argTolerance)
public boolean areYOrdinatesEqual(ProjCoordinate argToCompare, double argTolerance)
public boolean areZOrdinatesEqual(ProjCoordinate argToCompare, double argTolerance)
public boolean equals(java.lang.Object other)
equals
クラス内 java.lang.Object
public int hashCode()
hashCode
クラス内 java.lang.Object
public java.lang.String toString()
Example:
ProjCoordinate[6241.11 5218.25 12.3]
toString
クラス内 java.lang.Object
public java.lang.String toShortString()
Example:
[6241.11, 5218.25, 12.3]
public boolean hasValidZOrdinate()
public boolean hasValidXandYOrdinates()