|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.geometry.DirectPosition1D
Holds the coordinates for a one-dimensional position within some coordinate reference system.
| Field Summary | |
double |
ordinate
The ordinate value. |
| Constructor Summary | |
DirectPosition1D()
Constructs a position initialized to (0) with a coordinate reference system. |
|
DirectPosition1D(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Constructs a position with the specified coordinate reference system. |
|
DirectPosition1D(org.opengis.spatialschema.geometry.DirectPosition point)
Constructs a position initialized to the same values than the specified point. |
|
DirectPosition1D(double ordinate)
Constructs a 1D position from the specified ordinate. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns a copy of this position. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the coordinate reference system in which the coordinate is given. |
double[] |
getCoordinates()
Returns a sequence of numbers that hold the coordinate of this position in its reference system. |
int |
getDimension()
The length of coordinate sequence (the number of entries). |
double |
getOrdinate(int dimension)
Returns the ordinate at the specified dimension. |
org.opengis.spatialschema.geometry.DirectPosition |
getPosition()
Returns always this, the direct position for this
position. |
int |
hashCode()
Returns a hash value for this coordinate. |
void |
setCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Set the coordinate reference system in which the coordinate is given. |
void |
setLocation(org.opengis.spatialschema.geometry.DirectPosition position)
Set this coordinate to the specified direct position. |
void |
setOrdinate(int dimension,
double value)
Sets the ordinate value along the specified dimension. |
java.lang.String |
toString()
Returns a string representation of this coordinate. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double ordinate
| Constructor Detail |
public DirectPosition1D()
public DirectPosition1D(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
public DirectPosition1D(double ordinate)
public DirectPosition1D(org.opengis.spatialschema.geometry.DirectPosition point)
| Method Detail |
public org.opengis.spatialschema.geometry.DirectPosition getPosition()
this, the direct position for this
position.
getPosition in interface org.opengis.spatialschema.geometry.geometry.Positionpublic final org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem in interface org.opengis.spatialschema.geometry.DirectPositionpublic void setCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
crs - The new coordinate reference system, or .public final int getDimension()
DirectPosition1D objects.
getDimension in interface org.opengis.spatialschema.geometry.DirectPositionpublic double[] getCoordinates()
getCoordinates in interface org.opengis.spatialschema.geometry.DirectPosition
public final double getOrdinate(int dimension)
throws java.lang.IndexOutOfBoundsException
getOrdinate in interface org.opengis.spatialschema.geometry.DirectPositiondimension - The dimension, which must be 0.
java.lang.IndexOutOfBoundsException - if the specified dimension is out of bounds.
public final void setOrdinate(int dimension,
double value)
throws java.lang.IndexOutOfBoundsException
setOrdinate in interface org.opengis.spatialschema.geometry.DirectPositiondimension - The dimension, which must be 0.value - the ordinate value.
java.lang.IndexOutOfBoundsException - if the specified dimension is out of bounds.
public void setLocation(org.opengis.spatialschema.geometry.DirectPosition position)
throws org.opengis.spatialschema.geometry.MismatchedDimensionException
position - The new position for this point.
org.opengis.spatialschema.geometry.MismatchedDimensionException - if this point doesn't have the expected dimension.public java.lang.String toString()
CoordinateFormat.
This is okay for occasional formatting (for example for debugging purpose). But if there
is a lot of positions to format, users will get better performance and more control by
using their own instance of CoordinateFormat.
public int hashCode()
public java.lang.Object clone()
clone in interface org.opengis.spatialschema.geometry.DirectPosition
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||