public class BasicCoordinateTransform extends Object implements CoordinateTransform
ProjCoordinate
from one CoordinateReferenceSystem
into a different one, using reprojection and datum conversion
as required.
Computing the transform involves the following steps:
Datum
s are different,
the source geographic coordinate is converted
from the source to the target datum
as accurately as possible
[ SrcProjCRS {InverseProjection} ] SrcGeoCRS [ {Datum Conversion} ] TgtGeoCRS [ {Projection} TgtProjCRS ]
Information about the transformation procedure is pre-computed and cached in this object for efficient computation.
CoordinateTransformFactory
,
Serialized FormConstructor and Description |
---|
BasicCoordinateTransform(CoordinateReferenceSystem srcCRS,
CoordinateReferenceSystem tgtCRS)
Creates a transformation from a source
CoordinateReferenceSystem
to a target one. |
Modifier and Type | Method and Description |
---|---|
CoordinateReferenceSystem |
getSourceCRS() |
CoordinateReferenceSystem |
getTargetCRS() |
ProjCoordinate |
transform(ProjCoordinate src,
ProjCoordinate tgt)
Transforms a coordinate from the source
CoordinateReferenceSystem
to the target one. |
public BasicCoordinateTransform(CoordinateReferenceSystem srcCRS, CoordinateReferenceSystem tgtCRS)
CoordinateReferenceSystem
to a target one.srcCRS
- the source CRS to transform fromtgtCRS
- the target CRS to transform topublic CoordinateReferenceSystem getSourceCRS()
getSourceCRS
in interface CoordinateTransform
public CoordinateReferenceSystem getTargetCRS()
getTargetCRS
in interface CoordinateTransform
public ProjCoordinate transform(ProjCoordinate src, ProjCoordinate tgt) throws Proj4jException
CoordinateReferenceSystem
to the target one.transform
in interface CoordinateTransform
src
- the input coordinate to be transformedtgt
- the transformed coordinateProj4jException
- if a computation error is encounteredCopyright © 2021. All rights reserved.