|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.crs.Identifiable org.deegree.crs.transformations.Transformation
public abstract class Transformation
The Transformation
class supplies the most basic method interface for any given transformation.
The change of coordinates from one CRS to another CRS based on different datum is 'currently' only possible via a
coordinate Transformation
.
The derivation of transformation parameters can be done empirically or analytically.
The quality (accuracy) of an empirical derivation strongly depends on the chosen reference points, there allocation, and their number. Therefore different realizations for transformations from one datum to another exist. *
An analytic derivation is precise but mostly too complex to evaluate.
Constructor Summary | |
---|---|
Transformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS,
Identifiable id)
|
Method Summary | |
---|---|
boolean |
areInverse(Transformation other)
Checks if this transformation is the inverse of the other transformation, which means, this.sourceCRS equals other.targetCRS && this.targetCRS == other.sourceCRS. |
static java.lang.String |
createFromTo(java.lang.String source,
java.lang.String dest)
Little helper function to create a temporary id or name. |
void |
doTransform(double[] srcCoords,
int startPositionSrc,
double[] destCoords,
int startPositionDest,
int lastCoord)
Wraps the incoming coordinates into a List doTransform(List) . |
abstract java.util.List<javax.vecmath.Point3d> |
doTransform(java.util.List<javax.vecmath.Point3d> srcPts)
Do a transformation, e.g. the incoming data will be transformed into other coordinates. |
javax.vecmath.Point3d |
doTransform(javax.vecmath.Point3d coordinate)
Transforms a single point3d (by calling the doTransform( List |
abstract java.lang.String |
getImplementationName()
|
CoordinateSystem |
getSourceCRS()
|
int |
getSourceDimension()
|
CoordinateSystem |
getTargetCRS()
|
int |
getTargetDimension()
|
java.lang.String |
getTransformationName()
|
java.lang.StringBuilder |
getTransformationPath(java.lang.StringBuilder sb)
|
void |
inverse()
This method flags the transformation about it's state. |
abstract boolean |
isIdentity()
|
boolean |
isInverseTransform()
|
void |
setSourceCRS(CoordinateSystem newSource)
|
Methods inherited from class org.deegree.crs.Identifiable |
---|
checkForNullObject, checkForNullObject, checkForNullObject, equals, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getDescription, getDescriptions, getIdAndName, getIdentifier, getIdentifiers, getName, getNames, getVersion, getVersions, hasID, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Transformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS, Identifiable id)
sourceCRS
- targetCRS
- id
- an identifiable instance containing information about this transformationMethod Detail |
---|
public abstract java.lang.String getImplementationName()
public abstract java.util.List<javax.vecmath.Point3d> doTransform(java.util.List<javax.vecmath.Point3d> srcPts) throws TransformationException
srcPts
- the points which must be transformed, expected are following values either, long_1, lat_1, height_1,
long_2, lat_2, height_2. or long_1, lat_1, long_2, lat_2
TransformationException
- if a transform could not be calculated.public abstract boolean isIdentity()
public static java.lang.String createFromTo(java.lang.String source, java.lang.String dest)
source
- containing the value (id or name) of the 'src' coourdinateSystemdest
- containing the value (id or name) of the 'dest' coourdinateSystem
public void doTransform(double[] srcCoords, int startPositionSrc, double[] destCoords, int startPositionDest, int lastCoord) throws TransformationException
doTransform(List)
. The source array
will be read according to the dimension of the source CRS getSourceDimension()
and the target
coordinates will be put according to the dimension of the targetCRS getTargetDimension()
. If the
sourceDim < 2 or > 3 a transformation exception will be thrown.
srcCoords
- the array holding the source ('original') coordinates.startPositionSrc
- the position to start reading the coordinates from the source array (0 is the first).destCoords
- the array which will receive the transformed coordinates.startPositionDest
- the index of the destCoords array to put the results, if the result will exceed the array.length, the
array will be enlarged to hold the transformed coordinates.lastCoord
- the index of the last coordinate (normally length-1)
TransformationException
- If the sourceDim < 2 or soureDim > 3;
java.lang.IllegalArgumentException
- if
public javax.vecmath.Point3d doTransform(javax.vecmath.Point3d coordinate) throws TransformationException
coordinate
- to transform, if null
null will be returned.
TransformationException
- if the coordinate could not be transformed from the sourceCRS to the targetCRS.public boolean isInverseTransform()
public void inverse()
public java.lang.String getTransformationName()
public final CoordinateSystem getSourceCRS()
public final CoordinateSystem getTargetCRS()
public int getSourceDimension()
public int getTargetDimension()
public boolean areInverse(Transformation other)
other
- the transformation to check
public final java.lang.StringBuilder getTransformationPath(java.lang.StringBuilder sb)
sb
- to add the transformation chain to, if null
a new StringBuilder will be created.
public void setSourceCRS(CoordinateSystem newSource)
newSource
- to be used as the new source coordinate system.
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org