<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Jelmer,<br>
<br>
The correct parameters for the grid shift from epsg:28992 to WGS84
are described here:<br>
<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/geotiff/ticket/22#comment:3">http://trac.osgeo.org/geotiff/ticket/22#comment:3</a><br>
<br>
There are several different formulas in the EPSG database, but the
most recent one is your number 1 (= 4). It has been put in the
PROJ4-database by Frank Warmerdam, as you can read in the posting
above. Numbers 2 and 3 are older definitions, although they deliver
about the same results. They should be discarded, but will probably
hang around yet for a long time in older software.<br>
<br>
Groeten,<br>
<br>
Jan<br>
<br>
On 30-7-2013 10:49, Jelmer Baas wrote:
<blockquote
cite="mid:BC9747AD8551184D9B674A8310FE337B0C99E10C@mailserver"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoPlainText"><span lang="NL">Hello,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="NL"><o:p> </o:p></span></p>
<p class="MsoPlainText">For a new project we need to convert
coordinates from EPSG 28992 to EPSG 3044 with MapInfo, Oracle
AND a few Proj.4 programs (PostGIS, a custom DLL, Proj4js).
The problem we are having is that we're seeing some shifted
coordinates.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">First test point (in the Netherlands)<o:p></o:p></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Origin 135745.924
517131.216<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Proj4js 236345.39474983042
5839505.550959114<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Postgis(1) 236345.390264227
5839505.55017783<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Postgis(2) 236345.394817119
5839505.55055913<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";" lang="NL">MapInfo
236345.47 5839504.058<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";" lang="NL">CS2CSN
236345.39 5839505.55<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">DLL old(4) 236345.396465174
5839505.54496813<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">DLL new(3) 236345.390259674
5839505.55009311<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Oracle 236345.49107424
5839504.12246656<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Test point (in Germany)<o:p></o:p></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Origin 254870.45
415123.56<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">MapInfo 350265.960
5731670.259<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Postgis(1) 350263.4072329
5731667.880
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Postgis(2) 350263.4132521
5731667.880
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">DLL new(3) 350263.407243136
5731667.88019826
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">DLL old(4) 350263.403514925
5731667.88565864
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">Oracle(5) 350265.967728329
5731670.33312477
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family: "Courier
New";">CS2CS 350263.41
5731667.88 43.92 cs2cs +init=EPSG:28992 +to
+init=EPSG:3044<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">It seems MapInfo and Oracle more-or-less
agree, as do all Proj.4-based products. I don’t know which are
“right”, meaning I also don’t know which ones are wrong – let
alone find the fault.
<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hopefully someone can help me with this
problem, or at least point me in the right direction.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">(1): <span style="font-family:
"Courier New";">"+proj=sterea
+lat_0=52.15616055555555 +lon_0=5.38763888888889
+k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel
+towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725
+units=m +no_defs "<o:p></o:p></span></p>
<p class="MsoPlainText">(2) Another server where I updated the
spatial_ref_system:
<span style="font-family: "Courier New";">"+proj=sterea
+lat_0=52.15616055555555 +lon_0=5.38763888888889
+k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m
+towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812
+no_defs no_defs"<o:p></o:p></span></p>
<p class="MsoPlainText">(3) A custom built DLL for usage in VB6.
"+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889
+k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m
+towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812
+no_defs <>"<o:p></o:p></p>
<p class="MsoPlainText">(4) Same DLL. “+proj=sterea
+lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079
+x_0=155000 +y_0=463000 +ellps=bessel
+towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725
+units=m +no_defs <>”<o:p></o:p></p>
<p class="MsoPlainText">(5)<span style="font-family:
"Courier New";"> select
sdo_cs.transform(SDO_GEOMETRY('POINT(254870.45 415123.56)',
90112),25832) from dual;<o:p></o:p></span></p>
<p class="MsoPlainText">(5b) The Oracle definition contains some
tags I don’t see anywhere in Proj.4 (like the Bessel 1841
part): <o:p></o:p></p>
<p class="MsoPlainText">PROJCS["Netherlands National System",
GEOGCS [ "Netherlands Bessel", DATUM ["Netherlands Bessel",
SPHEROID ["Bessel 1841", 6377397.155, 299.1528128]], PRIMEM [
"Greenwich", 0.000000 ], UNIT ["Decimal Degree",
0.01745329251994330]], PROJECTION ["Stereographic"], PARAMETER
["Scale_Factor", 0.999908], PARAMETER ["Central_Meridian",
5.387639], PARAMETER ["Latitude_Of_Origin", 52.156161],
PARAMETER ["False_Easting", 155000.000000], PARAMETER
["False_Northing", 463000.000000], UNIT ["Meter",
1.000000000000]]
<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">A side note is that transformation via
my DLL doesn’t work properly (i.e., coordinates are shifted
tens of meters), unless I *<b>first</b>* transform to WGS84
and then to 3044. I assume this is caused by an easy-to-fix
error, but I don’t know what that is.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">P.S.: PostGIS, Proj4JS and my epsg file
are all up-to-date.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks for any help,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="NL">With kind regards,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="NL">Jelmer Baas<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="NL"><o:p> </o:p></span></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Proj mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/proj">http://lists.maptools.org/mailman/listinfo/proj</a></pre>
</blockquote>
</body>
</html>