|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.crs.Identifiable
org.deegree.crs.transformations.CRSTransformation
public abstract class CRSTransformation
The change of coordinates from one CRS to another CRS based on different datum is 'currently' only possible via a
coordinate Transformation
.
The transformation parameters could only be derived empirically by a set of points common to both coordinate reference systems it means by identical points. Choice, allocation, number and the quality of coordinates of the points affect extensive the results and the accuracy. Therefore different realizations for transformations from one datum to another exist.
Field Summary | |
---|---|
(package private) boolean |
isInverse
|
Constructor Summary | |
---|---|
CRSTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
Creates a CRSTransformation with following identifier and name:
FROM_id1_TO_id2. |
|
CRSTransformation(CoordinateSystem source,
CoordinateSystem target,
String identifier)
This constructor creates takes the id. |
|
CRSTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS,
String[] identifiers)
|
|
CRSTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS,
String[] identifiers,
String[] names,
String[] versions,
String[] descriptions,
String[] areasOfUse)
|
|
CRSTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS,
String identifier,
String name,
String version,
String description,
String areaOfUse)
|
Method Summary | |
---|---|
boolean |
areInverse(CRSTransformation other)
Checks if this transformation is the inverse of the other transformation, which means, this.sourceCRS equals other.targetCRS && this.targetCRS == other.sourceCRS. |
protected static String |
createFromTo(String from,
String to)
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 coords into a List doTransform(List) . |
abstract List<javax.vecmath.Point3d> |
doTransform(List<javax.vecmath.Point3d> srcPts)
Do a transformation, e.g. the incoming data comes from the sourceCRS and must be transformed to the targetCRS. |
javax.vecmath.Point3d |
doTransform(javax.vecmath.Point3d coordinate)
Transforms a single point3d (by calling the doTransform( List |
CoordinateSystem |
getSourceCRS()
|
int |
getSourceDimension()
|
CoordinateSystem |
getTargetCRS()
|
int |
getTargetDimension()
|
String |
getTransformationName()
|
StringBuilder |
getTransformationPath(StringBuilder sb)
|
void |
inverse()
Call this method to indicate the transform should be inverse (or not). |
abstract boolean |
isIdentity()
|
boolean |
isInverseTransform()
|
Methods inherited from class org.deegree.crs.Identifiable |
---|
checkForNullObject, checkForNullObject, getAreaOfUse, getAreasOfUse, getDescription, getDescriptions, getIdAndName, getIdentifier, getIdentifiers, getName, getNames, getVersion, getVersions, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
boolean isInverse
Constructor Detail |
---|
public CRSTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS, String[] identifiers)
sourceCRS
- targetCRS
- identifiers
- public CRSTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS, String[] identifiers, String[] names, String[] versions, String[] descriptions, String[] areasOfUse)
sourceCRS
- targetCRS
- identifiers
- names
- versions
- descriptions
- areasOfUse
- public CRSTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS, String identifier, String name, String version, String description, String areaOfUse)
sourceCRS
- targetCRS
- identifier
- name
- version
- description
- areaOfUse
- public CRSTransformation(CoordinateSystem source, CoordinateSystem target, String identifier)
source
- the geographic crs.target
- the geocentric crs.identifier
- public CRSTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS)
FROM_id1_TO_id2.
The name will be
generated the same way (with getName() instead). And version, description and areaOfUse set to 'Unkown'.
sourceCRS
- targetCRS
- Method Detail |
---|
protected static String createFromTo(String from, String to)
from
- containing the value (id or name) of the 'from' coourdinateSystemto
- containing the value (id or name) of the 'to' coourdinateSystem
public abstract List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
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
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 coords 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') coords.startPositionSrc
- the position to start reading the coords from the source array (0 is the first).destCoords
- the array which will receive the tranformed coords.startPositionDest
- the index of the destCoords array to put the results, if the result will exceed the arraylength, the
array will be enlarged to hold the transformed coords.lastCoord
- the index of the last coord (normally length-1)
TransformationException
- If the sourceDim < 2 or soureDim > 3;
IllegalArgumentException
- if
public javax.vecmath.Point3d doTransform(javax.vecmath.Point3d coordinate)
coordinate
- to transform, if null
null will be returned.
public abstract boolean isIdentity()
public boolean isInverseTransform()
public void inverse()
public String getTransformationName()
public final CoordinateSystem getSourceCRS()
public final CoordinateSystem getTargetCRS()
public int getSourceDimension()
public int getTargetDimension()
public boolean areInverse(CRSTransformation 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.
|
deegree 2.2 (2008/12/22 11:33 build-3038-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://deegree.sourceforge.net