Ticket #3240 (closed defect: invalid)
Wrong reprojection with datum shift (Germany/ETRS)
| Reported by: | stoeckmann | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4.3 release |
| Component: | Proj Support | Version: | 5.4 |
| Severity: | critical | Keywords: | wrong reprojection datum shift |
| Cc: | dmorissette, sdlime |
Description
I updated my MapServer from 5.0.0 to 5.4.2, and now transformations between two projected coordinates systems (Germany and ETRS) are generally calculated wrong. The following PHP MapScript? example shows it:
# --- direct reprojection ---
$Prj1 = ms_newProjectionObj('init=epsg:31468'); $Prj2 = ms_newProjectionObj('init=epsg:25833'); $pt = ms_newPointObj();
$pt->setXY(4588000, 5942000);
$pt->project($Prj1, $Prj2);
print $pt->x." ".$pt->y;
# --- indirect way using WGS ---
$PrjWGS = ms_newProjectionObj('init=epsg:4326'); $pt = ms_newPointObj();
$pt->setXY(4588000, 5942000);
$pt->project($Prj1, $PrjWGS);
$pt->project($PrjWGS, $Prj2);
print "<br>".$pt->x." ".$pt->y;
While MS 5.0.0 returns two identical coordinates, MS 5.4.2 returns this:
389470.239637 5940711.84385
389348.972139 5940544.41103
The upper coordinates are wrong.
