geographicToDatum static method
A projection adapter between WGS84 geographic and geographic positions on the target datum.
Use forward of the adapter to return a projection for:
- source:
lonandlatgeographic coordinates (WGS 84) - target:
lonandlatgeographic coordinates on the target datum
Use inverse of the adapter to return a projection for:
- source:
lonandlatgeographic coordinates on the target datum - target:
lonandlatgeographic coordinates (WGS 84)
The accuracy on conversions using other than the Datum.WGS84 datum is not guaranteed. The accuracy depends on the transformation parameter of the Helmert 7-parameter transformation used in the conversion.
Implementation
static ProjectionAdapter geographicToDatum(
CoordRefSys targetCrs,
Datum targetDatum,
) {
return EllipsoidalProjectionAdapter.geographicToGeographic(
// source is geographic coordinates in WGS 84
sourceCrs: CoordRefSys.CRS84,
sourceDatum: Datum.WGS84,
// target is geographic coordinates on the target datum
targetCrs: targetCrs,
targetDatum: targetDatum,
);
}