<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:128209475;
        mso-list-type:hybrid;
        mso-list-template-ids:-383470156 1127746534 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:12;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</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]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi,<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal> I seem to have blind spot somewhere. I can convert
wgs->google coordinate system fine:<o:p></o:p></p>

<p class=MsoNormal>select astext(transform(geomfromtext('POINT(-22.19921875
1.47265625)',4326), 900913));<o:p></o:p></p>

<p class=MsoNormal> -> "POINT(-2471205.72725849
163953.396913543)"<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>But when try to convert it back:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>select
st_asewkt(transform(geomfromtext('POINT(-2471205.72725849
163953.396913543)',900913), 4326));<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>then I get absurd numbers:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal> -> "SRID=4326;POINT(-3.48051770446448e-06
2.30891282668362e-07)"<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>And there is also message: WARNING:  transform: -38
(failed to load NAD27-83 correction file)<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>In other machine (windows btw) same query works fine. <o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>After restart of the database (postgis which is debian) it
worked exactly one time. See 2 identical queries in a row:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>gis=# select
st_asewkt(st_transform(geomfromtext('POINT(-2471205.72725849
163953.396913543)',900913), 4326));<o:p></o:p></p>

<p class=MsoNormal>                  
st_asewkt<o:p></o:p></p>

<p class=MsoNormal>------------------------------------------------<o:p></o:p></p>

<p class=MsoNormal> SRID=4326;POINT(-22.19921875 1.47265624999999)<o:p></o:p></p>

<p class=MsoNormal>(1 row)<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>gis=# select
st_asewkt(st_transform(geomfromtext('POINT(-2471205.72725849
163953.396913543)',900913), 4326));<o:p></o:p></p>

<p class=MsoNormal>WARNING:  transform: -38 (failed to load NAD27-83
correction file)<o:p></o:p></p>

<p class=MsoNormal>                         
st_asewkt<o:p></o:p></p>

<p class=MsoNormal>-------------------------------------------------------------<o:p></o:p></p>

<p class=MsoNormal> SRID=4326;POINT(-3.48051770446448e-06
2.30891282668362e-07)<o:p></o:p></p>

<p class=MsoNormal>(1 row)<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Reinstalling postgis packages, including proj did not help.
I have postgres 8.3 with 1.3.3-3 (from postgresql-8.3-postgis debian package).
I triad also with 1.3.5 postgis which was latest debian package what I found,
same thing<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Also I do not get what all this has to do with “NAD27-83
correction”<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>/Jaak Laineste<o:p></o:p></p>

<p class=MsoNormal>jaak@nutiteq.com<o:p></o:p></p>

<p class=MsoNormal>Skype: nutiteq<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</body>

</html>