|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.cs.CRSIdentifiable org.deegree.cs.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(ICRS sourceCRS,
ICRS targetCRS,
CRSResource 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. |
boolean |
canTransform(ICRS sourceCRS,
ICRS targetCRS)
|
boolean |
contains(ICRS crs)
Returns true if this Transformation transforms over the given crs. |
Transformation |
copyTransformation(CRSResource newId)
|
static String |
createFromTo(String source,
String dest)
Little helper function to create a temporary id or name. |
void |
doTransform(double[] srcOrdinates,
int startPositionSrc,
double[] destOrdinates,
int startPositionDest,
int length)
Wraps the incoming coordinates into a List doTransform(List) . |
abstract List<javax.vecmath.Point3d> |
doTransform(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 |
boolean |
equalOnCRS(Transformation other)
Returns true if the source and target of this transformation equal the source and target of the given transformation. |
boolean |
equals(Object other)
|
abstract String |
getImplementationName()
|
ICRS |
getSourceCRS()
|
int |
getSourceDimension()
|
ICRS |
getTargetCRS()
|
int |
getTargetDimension()
|
String |
getTransformationName()
|
StringBuilder |
getTransformationPath(StringBuilder sb)
|
void |
inverse()
This method flags the transformation about it's state. |
abstract boolean |
isIdentity()
|
boolean |
isInverseTransform()
|
void |
setSourceCRS(ICRS newSource)
|
Methods inherited from class org.deegree.cs.CRSIdentifiable |
---|
addAreaOfUse, addName, checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getId, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hashCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Transformation(ICRS sourceCRS, ICRS targetCRS, CRSResource id)
sourceCRS
- targetCRS
- id
- an identifiable instance containing information about this transformationMethod Detail |
---|
public abstract String getImplementationName()
public abstract List<javax.vecmath.Point3d> doTransform(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 String createFromTo(String source, 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[] srcOrdinates, int startPositionSrc, double[] destOrdinates, int startPositionDest, int length) 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.
srcOrdinates
- the array holding the source ('original') coordinates.startPositionSrc
- the position to start reading the coordinates from the source array (0 is the first).destOrdinates
- 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.length
- the number of source ordinates to transform
TransformationException
- If the sourceDim < 2 or soureDim > 3;
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 String getTransformationName()
public final ICRS getSourceCRS()
public final ICRS getTargetCRS()
public int getSourceDimension()
public int getTargetDimension()
public boolean areInverse(Transformation other)
other
- the transformation to check
public final StringBuilder getTransformationPath(StringBuilder sb)
sb
- to add the transformation chain to, if null
a new StringBuilder will be created.
public boolean equalOnCRS(Transformation other)
other
- transformation to check against
public boolean contains(ICRS crs)
crs
- to check for
public void setSourceCRS(ICRS newSource)
newSource
- to be used as the new source coordinate system.public boolean canTransform(ICRS sourceCRS, ICRS targetCRS)
sourceCRS
- from which ordinates will be transformedtargetCRS
- to which ordinates will be transformed.
public boolean equals(Object other)
equals
in class CRSIdentifiable
public Transformation copyTransformation(CRSResource newId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |