Dear list,
I currently work with the EPSG database in order to make some CRS transformations. My primary goal is to transform a CRS expressed into WGS84 to a CRS in Lambert II étendu. I use the EPSG:4326 code for the WGS84 and the EPSG:27572 for the Lambert II. Everything works but the result isn't
accurate. For example, I have a point at
longitude 5.08° east and at latitude 47.31° north
(in WGS84).
The result of the transformation is a point with
the following coords :
X = 807332 meters and
Y = 2260657
meters.
The correct point will have those coords
:
X = 807389 meters and Y = 2260315 meters.
My code is straithforward :
CoordinateReferenceSystem sourceCRS =
CRS.decode("EPSG:4326");
CoordinateReferenceSystem targetCRS =
CRS.decode("EPSG:27572");
CoordinateOperationFactory opFactory =
FactoryFinder.getCoordinateOperationFactory(new Hints(Hints.LENIENT_DATUM_SHIFT,
Boolean.TRUE));
CoordinateOperation operation = opFactory.createOperation(sourceCRS, targetCRS); MathTransform Transfo = (MathTransform) operation.getMathTransform(); DirectPosition SourcePoint = new
GeneralDirectPosition(Latitude, Longitude);
DirectPosition TargetPoint =
Transfo.transform(SourcePoint, null);
Is it an error in my code, in he EPSG database, or
in the projection library ?
Has someone an idea ? Any help will be greatly appreciated.
Kind regards,
Loïc
|
- [Geotools-gt2-users] CRS transformation not accurate Loïc MAZE
- Re: [Geotools-gt2-users] CRS transformation not a... Martin Desruisseaux
- Re: [Geotools-gt2-users] CRS transformation n... Loïc MAZE
- Re: [Geotools-gt2-users] CRS transformation n... Martin Desruisseaux
- Re: [Geotools-gt2-users] CRS transformati... Loïc MAZE
- Re: [Geotools-gt2-users] CRS transfor... Loïc MAZE
- Re: [Geotools-gt2-users] CRS tra... Martin Desruisseaux
- Re: [Geotools-gt2-users] CRS... Martin Desruisseaux