Geoff<br>The scale factor (the difference to 1) in +towgs84 should be in ppm. You should have +towgs84=....,1.86.<br>I tried your command line and the results were the ones you give. However if you don&#39;t consider the datum transformtion, just the projection, and apply it to those geographic coordinates you get something very close to the result you expect (less than 1 meter distance):<br>
<br>proj +proj=tmerc +lat_0=0 +lon_0=121.46716061 +k=1 +x_0=0 +y_0=-3457140.589 +ellps=krass<br>121d35&#39;54.41138&quot;E 31d17&#39;27.50965&quot;N<br>12500.45        6163.65<br><br>Probably your test point is in the local datum and not WGS84.<br>
<br>Regards<br><br>José Gonçalves<br><br><br><br><br><br><div class="gmail_quote">2011/3/28 Geoff Shipton <span dir="ltr">&lt;<a href="mailto:geoff@tritonimaginginc.com">geoff@tritonimaginginc.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">Greetings to all,</p><p class="MsoNormal"> </p><p class="MsoNormal">I am looking for some assistance with a problem we have using the PROJ4 libraries, I am not a programmer neither am I geodesist – however I know enough to be dangerous! Please bear with me…</p>
<p class="MsoNormal"> </p><p class="MsoNormal">We have a customer in Shanghai China that is uses something he refers to as the Shanghai Local projection.</p><p class="MsoNormal"> </p><p class="MsoNormal">It is built on Beijing 1954 and uses that datum, the 7 parameter shift he gives are as follows:</p>
<p class="MsoNormal"> </p><p class="MsoNormal">TX:          170.076</p><p class="MsoNormal">TY:          154.924</p><p class="MsoNormal">TZ:          97.308</p><p class="MsoNormal">RX:         1.666408</p><p class="MsoNormal">
RY:          0.872624</p><p class="MsoNormal">RZ:          -8.648183</p><p class="MsoNormal">K:            0.00000186</p><p class="MsoNormal"> </p><p class="MsoNormal">The Ellipsoid is Krassovsky 1940</p><p class="MsoNormal">
 </p><p class="MsoNormal">The local coordinate system parameters are TM:</p><p class="MsoNormal"> </p><p class="MsoNormal">CM: 121.46716061</p><p class="MsoNormal">Scale: 1.0</p><p class="MsoNormal">False Eastings: 0</p><p class="MsoNormal">
False Northings: -34587140.589</p><p class="MsoNormal"> </p><p class="MsoNormal">I constructed the following PROJ4 string:</p><p class="MsoNormal"> </p><p class="MsoNormal">+proj=tmerc +lat_0=0 +lon_0=121.46716061 +k=1 +x_0=0 +y_0=-3457140.589 +ellps=krass +towgs84=170.0760,154.9240,97.3080,1.6664,0.8726,-8.6482,0.00000186 +units=m +no_defs</p>
<p class="MsoNormal"> </p><p class="MsoNormal">However I am not getting the correct results, for example.</p><p class="MsoNormal">WGS84 coordinate</p><p class="MsoNormal">31° 17&#39; 27.50965&quot; N           121° 35&#39; 54.41138&quot; E         13.7729</p>
<p class="MsoNormal">Should give Shanghai Local coordinate</p><p class="MsoNormal">12501.0727E       6164.1228N</p><p class="MsoNormal"> </p><p class="MsoNormal">However the position from PROJ4 is:</p><p class="MsoNormal">
12953.30E            6042.97N</p><p class="MsoNormal"> </p><p class="MsoNormal">We very rarely need to invoke this type of transformation so it’s quite possible something is awry with our code, but I sure would appreciate any thoughts on the problem.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">Geoff Shipton,<br>Triton Imaging Inc.<br>Customer Support.<br>Capitola CA.<br><a href="mailto:geoff@tritonimaginginc.com" target="_blank">geoff@tritonimaginginc.com</a><br><br>
The information contained in this message may be privileged or confidential information intended solely for the use of the addressee(s).  Any views or opinions presented in this communication do not necessarily represent those of Triton Imaging, Inc.  If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please immediately notify me and you are hereby instructed to delete all electronic copies and destroy all printed copies.</p>
<p class="MsoNormal"> </p></div></div><br>_______________________________________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br></blockquote></div><br>