<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:st="&#1;" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/workflow/"
xmlns:ns2="http://schemas.microsoft.com/office/2006/digsig-setup"
xmlns:ns3="http://schemas.microsoft.com/office/2006/digsig"
xmlns:ns4="http://schemas.openxmlformats.org/package/2006/digital-signature"
xmlns:ns5="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ns6="http://schemas.microsoft.com/office/2004/12/omml"
xmlns:ns7="http://schemas.openxmlformats.org/package/2006/relationships"
xmlns:ns8="http://microsoft.com/sharepoint/webpartpages"
xmlns:ns9="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:ns10="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:ns11="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/"
xmlns:ns12="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService"
xmlns:ns13="urn:schemas-microsoft-com:"
xmlns:ns0="urn:schemas-microsoft-com:office:smarttags">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--a:link
        {mso-style-priority:99;}
span.MSOHYPERLINK
        {mso-style-priority:99;}
a:visited
        {mso-style-priority:99;}
span.MSOHYPERLINKFOLLOWED
        {mso-style-priority:99;}
p.MSOPLAINTEXT
        {mso-style-priority:99;}
li.MSOPLAINTEXT
        {mso-style-priority:99;}
div.MSOPLAINTEXT
        {mso-style-priority:99;}
p.MSOLISTPARAGRAPH
        {mso-style-priority:34;}
li.MSOLISTPARAGRAPH
        {mso-style-priority:34;}
div.MSOLISTPARAGRAPH
        {mso-style-priority:34;}
span.PLAINTEXTCHAR
        {mso-style-priority:99;}
span.PLAINTEXTCHAR0
        {mso-style-priority:99;}
span.PLAINTEXTCHAR00
        {mso-style-priority:99;}

 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msolistparagraph, li.msolistparagraph, div.msolistparagraph
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.plaintextchar
        {font-family:Consolas;}
span.plaintextchar0
        {font-family:Consolas;}
span.plaintextchar00
        {font-family:Consolas;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:Calibri;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:Calibri;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:Calibri;
        color:#1F497D;}
span.EmailStyle27
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle28
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 69.6pt 72.0pt 69.6pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:922564647;
        mso-list-type:hybrid;
        mso-list-template-ids:-1329198066 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1927835445;
        mso-list-type:hybrid;
        mso-list-template-ids:-306839458 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
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-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am still having problems using the geo-transformation
utilities in GDAL.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I don&#8217;t suppose anyone managed to
identify why the following code always refuses to create a </span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>OGRCoordinateTransformation</span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> for me? <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The code below is an excerpt from code I
use to open geotiffs and extract geocoords.&nbsp; However, although I can
extract geocoords as Eastings/Northings, I cannot then convert them to WGS84
lat/long (essential for my purpose).&nbsp; I am running this on linux SUSE-10
SP2.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Can anyone help?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>// g++ -Wno-deprecated -m64 -g -o georef georef.c++ -lgdal -lm<br>
<br>
#include &quot;/usr/local/src/FWTools-2.0.6/include/gdal.h&quot;<br>
#include &quot;/usr/local/src/FWTools-2.0.6/include/gdal_priv.h&quot;<br>
#include &quot;/usr/local/src/FWTools-2.0.6/include/ogr_spatialref.h&quot;<br>
/*<i><span style='font-style:italic'> <b><span style='font-weight:bold'>Following
output is from the MapServer tutorial ...data/raster/shdrlfi020l_ugl.tif
file.&nbsp; This file opens<br>
&nbsp;&nbsp; fine in 'openev' and gives easting/northing readouts OK.<br>
</span></b></span></i>Driver: GTiff/GeoTIFF<br>
Projection is `'<br>
Origin = (176371.000000,548761.000000)<br>
Pixel Size = (1000.000000,-1000.000000)<br>
<b><span style='font-weight:bold'>ERROR 1: No PROJ.4 translation for source
SRS, coordinate<br>
transformation initialization has failed.<br>
</span></b>!!!Cannot create transform from input file georef space to WGS84<br>
*/<br>
/*&nbsp; Following <b><span style='font-weight:bold'>output is from a geotiff
file that also works fine with 'openev'.</span></b><br>
Driver: GTiff/GeoTIFF<br>
Projection is
`PROJCS[&quot;TM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
D-01&quot;,GEOGCS[&quot;NAD27&quot;,DATUM[&quot;North_American_Datum_1927&quot;,SPHEROID[&quot;Clarke
1866&quot;,6378206.4,294.9786982139006,AUTHORITY[&quot;EPSG&quot;,&quot;7008&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6267&quot;]],PRIMEM[&quot;Greenwich&quot;,0],UNIT[&quot;degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot;,&quot;4267&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,-124.5],PARAMETER[&quot;scale_factor&quot;,1],PARAMETER[&quot;false_easting&quot;,0],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]]]'<br>
Origin = (138586.280052,3768995.081326)<br>
Pixel Size = (50.000000,-50.000000)<br>
<b><span style='font-weight:bold'>ERROR 1: No PROJ.4 translation for source
SRS, coordinate<br>
transformation initialization has failed.<br>
</span></b>!!!Cannot create transform from input file georef space to WGS84<br>
*/<br>
int main(int argc, char **argv)<br>
{<br>
&nbsp; GDALDataset&nbsp; *poDataset;<br>
<br>
&nbsp; GDALAllRegister();<br>
<br>
&nbsp; poDataset = (GDALDataset *) GDALOpen( argv[1], GA_ReadOnly );<br>
&nbsp; if( poDataset == NULL )<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; fprintf(stderr, &quot;!!!poDataset was NULL\n&quot;);<br>
&nbsp;&nbsp;&nbsp; exit(-1);<br>
&nbsp; }<br>
&nbsp; double adfGeoTransform[6];<br>
<br>
&nbsp; printf( &quot;Driver: %s/%s\n&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
poDataset-&gt;GetDriver()-&gt;GetDescription(), <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
poDataset-&gt;GetDriver()-&gt;GetMetadataItem( GDAL_DMD_LONGNAME ) );<br>
<br>
&nbsp; if( poDataset-&gt;GetProjectionRef()&nbsp; != NULL )<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( &quot;Projection is `%s'\n&quot;,
poDataset-&gt;GetProjectionRef() );<br>
<br>
&nbsp; if( poDataset-&gt;GetGeoTransform( adfGeoTransform ) == CE_None )<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( &quot;Origin =
(%.6f,%.6f)\n&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;adfGeoTransform[0],
adfGeoTransform[3] );<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( &quot;Pixel Size =
(%.6f,%.6f)\n&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
adfGeoTransform[1], adfGeoTransform[5] );<br>
&nbsp; }<br>
<br>
&nbsp; // We have to convert from native input file <br>
&nbsp; // geospace to our standard WGS84 space so create a transform here.<br>
<br>
&nbsp; // First create a spatial reference in the input space<br>
&nbsp; OGRSpatialReference iref;<br>
&nbsp; const char *proj_ref = poDataset-&gt;GetProjectionRef();<br>
&nbsp; char *tmp = NULL;<br>
&nbsp; if (proj_ref)<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; tmp = (char *)malloc(strlen(proj_ref)+1);<br>
&nbsp;&nbsp;&nbsp; iref.importFromWkt(&amp;tmp);<br>
<br>
&nbsp;&nbsp;&nbsp; // Create a spatial reference in WGS88 lat/long space
and<br>
&nbsp;&nbsp;&nbsp; // create a transform object betseen input and output
space<br>
&nbsp;&nbsp;&nbsp; OGRSpatialReference oref;<br>
&nbsp;&nbsp;&nbsp; oref.SetWellKnownGeogCS(&quot;WGS84&quot;);<br>
&nbsp;&nbsp;&nbsp; OGRCoordinateTransformation *coord_transform<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = OGRCreateCoordinateTransformation(&amp;iref,
&amp;oref);<br>
&nbsp;&nbsp;&nbsp; if (!coord_transform)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(stderr, &quot;!!!FAILED! Cannot create
transform from input file &quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&quot;georef space to WGS84\n&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp; } // end case default<br>
&nbsp;&nbsp;&nbsp; free(tmp);<br>
<br>
&nbsp; } // end if got projection ref<br>
<br>
} // end main<br>
</span></font><font color=navy face=Arial><span style='font-family:Arial;
color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div>

<p class=MsoNormal><st1:City w:st="on"><st1:place w:st="on"><b><i><font size=2
  color=purple face=Arial><span style='font-size:10.0pt;font-family:Arial;
  color:purple;font-weight:bold;font-style:italic'>Gary</span></font></i></b></st1:place></st1:City><b><i><font
size=2 color=purple face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:purple;font-weight:bold;font-style:italic'> </span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></i></b></p>

</div>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Smart, Gary <br>
<b><span style='font-weight:bold'>Sent:</span></b> 21 July 2009 08:46<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">'gdal-dev@lists.osgeo.org'</st1:PersonName><br>
<b><span style='font-weight:bold'>Cc:</span></b> 'Martin Chapman'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [gdal-dev] Converting
raster pixel space to geospace</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Yes I have the gdalinfo &#8211; it seems
happy enough with the files I am experimenting with.&nbsp; I&#8217;m not sure
what &#8216;proj&#8217; is supposed to do and can&#8217;t find any info on it
&#8211; but it is in my path and runs?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I have attached a small extract from my
ever failing code &#8211; it compiles and runs.&nbsp; Perhaps someone could
tell me what&#8217;s wrong.&nbsp; It seems to fail to set up a coord transform
for any file, even though openev happily deals with them.&nbsp; I can&#8217;t
help feeling that there is something decidedly dodgy about the way I prime the
transform with the &#8216;importFromWkt call.&nbsp; Perhaps the transform is
never getting the transform string at all?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I also noticed that one of the map tif
files from the mapserver tutorial doesn&#8217;t return any projection info fro
mthe getProjectionRef call &#8211; will this cause problems when trying to set
up a transformation in future.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The files I used, and the response they
give, are included in the attachment as comments.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><b><i><font size=2
  color=purple face=Arial><span style='font-size:10.0pt;font-family:Arial;
  color:purple;font-weight:bold;font-style:italic'>Gary</span></font></i></b></st1:City></st1:place><b><i><font
size=2 color=purple face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:purple;font-weight:bold;font-style:italic'> </span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></i></b></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Martin Chapman [mailto:chapmanm@pixia.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 20 July 2009 22:46<br>
<b><span style='font-weight:bold'>To:</span></b> Smart, Gary<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [gdal-dev] Converting
raster pixel space to geospace</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><font size=2
  color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
  font-family:Calibri;color:#1F497D'>Gary</span></font></st1:City></st1:place><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'>,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'>I tried the
projection string in some of my code and it worked fine.&nbsp; I stepped
through the gdal code and proj4 loaded the transform object ok too which means
the projection string is fine and that your environment suffers from one of the
following:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=msolistparagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'><![if !supportLists]><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'><span style='mso-list:Ignore'>1.<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color="#1f497d"
face=Calibri><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;
color:#1F497D'>&nbsp;Proj.dll cannot be found in the path on your machine or is
not in the same directory as gdal.dll and is failing when gdal calls
LoadLibrary() on &#8220;proj.dll&#8221;.<o:p></o:p></span></font></p>

<p class=msolistparagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'><![if !supportLists]><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'><span style='mso-list:Ignore'>2.<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color="#1f497d"
face=Calibri><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;
color:#1F497D'>The proj.dll can be found but a dependency like the nad shift
files or gdal data cannot be found.<o:p></o:p></span></font></p>

<p class=msolistparagraph><font size=2 color="#1f497d" face=Calibri><span
lang=EN-US style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'>I would try the
following:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=msolistparagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'><span style='mso-list:Ignore'>1.<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color="#1f497d"
face=Calibri><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;
color:#1F497D'>Use gdalinfo.exe that should come with fwtools or can be
downloaded from gdal.org and run the command gdalinfo.exe &#8211; formats and or
ogrinfo.exe &#8211;formats.<o:p></o:p></span></font></p>

<p class=msolistparagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'><span style='mso-list:Ignore'>2.<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color="#1f497d"
face=Calibri><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;
color:#1F497D'>See if the output from that command gives any useful information
on why proj is failing.<o:p></o:p></span></font></p>

<p class=msolistparagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'><span style='mso-list:Ignore'>3.<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></font></span></span></font><![endif]><font size=2 color="#1f497d"
face=Calibri><span lang=EN-US style='font-size:11.0pt;font-family:Calibri;
color:#1F497D'>From the command line type in proj.exe and see if the proj util
can be found in your path.&nbsp; If it can be found then maybe it will give
some useful info.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'>Sorry I am not more
help than that but the projection string is valid.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'>Martin<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
gdal-dev-bounces@lists.osgeo.org [mailto:gdal-dev-bounces@lists.osgeo.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Smart, Gary<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, July 20, 2009 8:50
AM<br>
<b><span style='font-weight:bold'>To:</span></b> gdal-dev@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [gdal-dev] Converting
raster pixel space to geospace<o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks Martin, but now to the next
problem&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I downloaded PRROJ.4 which seemed to
configure and compile OK.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Having set the PROJ_LIB as you proposed, I
now get:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>ERROR 1: No PROJ.4 translation for source
SRS, coordinate transformation initialization has failed.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I guess I am still missing
comething.&nbsp; The failure came from the same geotiff file as below.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I also couldn&#8217;t find a &#8216;data
dir&#8217; in the GDAL source and therefore GDAL_DATA env var remained
unset.&nbsp; We installed everything from the FWTools download for our Linux
SUSE10 system.&nbsp; Should there be a &#8216;data&#8217; directory under the
FWTools directory somewhere?&nbsp; There is no GDAL source in this directory
&#8211; just include files and libraries.&nbsp; I presumed this was all that
was needed to use GDAL?&nbsp; &nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Martin Chapman [mailto:chapmanm@pixia.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 20 July 2009 14:49<br>
<b><span style='font-weight:bold'>To:</span></b> Smart, Gary;
gdal-dev@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [gdal-dev] Converting
raster pixel space to geospace</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><font size=2
  color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
  font-family:Calibri;color:#1F497D'>Gary</span></font></st1:City></st1:place><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'>,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'>Set your paths like
such on startup or as an environment variable:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#a31515" face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>GDAL_DATA
points at the data dir that comes with gdal source.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#a31515" face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>PROJ_LIB
point to the nad directory that you download from proj4 website.</span></font><font
size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:11.0pt;
font-family:Calibri;color:#1F497D'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>string env =
string(<font color="#a31515"><span style='color:#A31515'>&quot;GDAL_DATA=&quot;</span></font>)
+ dataPath;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>_putenv(env.c_str());<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>env = string(<font
color="#a31515"><span style='color:#A31515'>&quot;PROJ_LIB=&quot;</span></font>)
+ nadPath;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>_putenv(env.c_str());<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>and / or<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>CPLSetConfigOption(<font
color="#a31515"><span style='color:#A31515'>&quot;GDAL_DATA&quot;</span></font>,
dataPath.c_str());<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>CPLSetConfigOption(<font
color="#a31515"><span style='color:#A31515'>&quot;PROJ_LIB&quot;</span></font>,
nadPath.c_str());<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'>Martin<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span lang=EN-US
style='font-size:11.0pt;font-family:Calibri;color:#1F497D'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
gdal-dev-bounces@lists.osgeo.org [mailto:gdal-dev-bounces@lists.osgeo.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Smart, Gary<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, July 20, 2009 7:38
AM<br>
<b><span style='font-weight:bold'>To:</span></b> gdal-dev@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [gdal-dev] Converting
raster pixel space to geospace<o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>OK - I can get it to compile and not crash instantly (bonanza!)<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>However, when I try to create the OGR transform using importFromWkt, <o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>I get the following:<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>OGRCoordinateTransformation failed.<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>Does anyone know what this means?&nbsp; Is there some part of OGR/GDAL I
have yet to install?<o:p></o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</div>

</div>

</div>

</body>

</html>