CoordinateTransformpublic 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:
Datums 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 ]
BasicCoordinateTransform objects are stateful,
and thus are not thread-safe.
However, they may be reused any number of times within a single thread.
Information about the transformation procedure is pre-computed and cached in this object for efficient computation.
CoordinateTransformFactory| 构造器 | 说明 |
|---|---|
BasicCoordinateTransform(CoordinateReferenceSystem srcCRS,
CoordinateReferenceSystem tgtCRS) |
Creates a transformation from a source
CoordinateReferenceSystem
to a target one. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
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 在接口中 CoordinateTransformpublic CoordinateReferenceSystem getTargetCRS()
getTargetCRS 在接口中 CoordinateTransformpublic ProjCoordinate transform(ProjCoordinate src, ProjCoordinate tgt) throws Proj4jException
CoordinateReferenceSystem
to the target one.transform 在接口中 CoordinateTransformsrc - the input coordinate to be transformedtgt - the transformed coordinateProj4jException - if a computation error is encounteredCopyright © 2019. All rights reserved.