|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.iso.coordinate.DirectPositionImpl
public class DirectPositionImpl
Constructor Summary | |
---|---|
DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
|
|
DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
double[] coord)
Creates a direct Position by using coordinates of another direct Position |
|
DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
double x,
double y,
double z)
|
|
DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
double x,
double y,
double z,
double m)
|
|
DirectPositionImpl(org.opengis.geometry.DirectPosition position)
Creates a direct Position by using coordinates of another direct Position |
|
DirectPositionImpl(org.opengis.geometry.coordinate.Position position)
|
Method Summary | |
---|---|
void |
add(DirectPositionImpl otherDP)
Adds the ordinates of another direct position to the ordinates of this direct position. |
void |
add(double[] values)
Adds certain value to each ordinate of this direct position. |
DirectPositionImpl |
clone()
|
double |
distance(org.opengis.geometry.DirectPosition p)
Calculates the distance to another direct position |
double |
distanceSquare(org.opengis.geometry.DirectPosition p)
Calculates the square of the distance to another direct position |
void |
divideBy(double factor)
Divides the ordinates of the DirectPosition by a factor: newOrdinate = oldOrdinate / factor |
boolean |
equals(org.opengis.geometry.DirectPosition position,
double tol)
Compares coodinates of Direct Positions and allows a tolerance value in the comparison |
boolean |
equals(java.lang.Object o)
Compares coodinates of DirectPosition Implementation Note: Parameter has to be of Type DirectPosition (not DirectPositionImpl), so that the equals method is found for DirectPosition´s and DirectPositionImpl´s |
double[] |
getCoordinate()
|
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
|
double[] |
getCoordinates()
Deprecated. |
int |
getDimension()
|
org.opengis.geometry.DirectPosition |
getDirectPosition()
|
double |
getOrdinate(int dimension)
|
org.opengis.geometry.DirectPosition |
getPosition()
Deprecated. |
double |
getX()
Returns the x value of the coordinate represented by this DirectPosition |
double |
getY()
Returns the y value of the coordinate represented by this DirectPosition |
double |
getZ()
Returns the z value of the coordinate represented by this DirectPosition |
int |
hashCode()
|
void |
scale(double factor)
Scales the ordinates of the DirectPosition by a factor: newOrdinate = oldOrdinate * factor |
void |
setCoordinate(double[] coord)
|
void |
setOrdinate(int dimension,
double value)
|
void |
setX(double x)
Sets the x value of the coordinate represented by this DirectPosition |
void |
setY(double y)
Sets the y value of the coordinate represented by this DirectPosition |
void |
setZ(double z)
Sets the z value of the coordinate represented by this DirectPosition |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
public DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs, double[] coord)
crs
- coord
- public DirectPositionImpl(org.opengis.geometry.coordinate.Position position)
public DirectPositionImpl(org.opengis.geometry.DirectPosition position)
position
- public DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs, double x, double y, double z)
crs
- x
- y
- z
- public DirectPositionImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs, double x, double y, double z, double m)
crs
- x
- y
- z
- m
- Method Detail |
---|
public int getDimension()
getDimension
in interface org.opengis.geometry.DirectPosition
public double[] getCoordinate()
getCoordinate
in interface org.opengis.geometry.DirectPosition
@Deprecated public double[] getCoordinates()
getCoordinates
in interface org.opengis.geometry.DirectPosition
public double getOrdinate(int dimension) throws java.lang.IndexOutOfBoundsException
getOrdinate
in interface org.opengis.geometry.DirectPosition
java.lang.IndexOutOfBoundsException
public void setOrdinate(int dimension, double value) throws java.lang.IndexOutOfBoundsException
setOrdinate
in interface org.opengis.geometry.DirectPosition
java.lang.IndexOutOfBoundsException
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem
in interface org.opengis.geometry.DirectPosition
public DirectPositionImpl clone()
clone
in class java.lang.Object
public void setCoordinate(double[] coord)
coord
- public double getX()
public double getY()
public double getZ()
public void setX(double x)
x
- public void setY(double y)
y
- public void setZ(double z)
z
- public boolean equals(org.opengis.geometry.DirectPosition position, double tol)
position
- Direct Position to compare withtol
- Epsilon tolerance value
public boolean equals(java.lang.Object o)
equals
in interface org.opengis.geometry.DirectPosition
equals
in class java.lang.Object
p
- DirectPosition
public int hashCode()
hashCode
in interface org.opengis.geometry.DirectPosition
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public double distance(org.opengis.geometry.DirectPosition p)
p
- direct Position
public double distanceSquare(org.opengis.geometry.DirectPosition p)
p
- another direct Position
public void add(double[] values)
values
- Array of doubles. values[0] will be added to the X ordinate, values[1] to the Y value and an optional values[2] to the Z value.public void add(DirectPositionImpl otherDP)
otherDP
- DirectPosition which ordinates shall be added to this DirectPositionpublic void scale(double factor)
factor
- Scaling factorpublic void divideBy(double factor)
factor
- Value of divisor@Deprecated public org.opengis.geometry.DirectPosition getPosition()
getPosition
in interface org.opengis.geometry.coordinate.Position
public org.opengis.geometry.DirectPosition getDirectPosition()
getDirectPosition
in interface org.opengis.geometry.coordinate.Position
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |