<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: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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:0cm;
        line-height:115%;
        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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.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]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal>I&#8217;m experiencing some inconsistent behavior with GDAL 1.8.0&#8217;s projection handling routines that I&#8217;d like to bring to someone&#8217;s attention. <o:p></o:p></p><p class=MsoNormal>I&#8217;m playing with some maps in Lambert Conformal Conic, and the same projection information is getting handled differently depending on how I provide it to GDAL.<o:p></o:p></p><p class=MsoNormal>I started with a MapInfo coordinate system string:<o:p></o:p></p><p class=MsoNormal>Coordsys Earth Projection 3, 74, &#8220;m&#8221;, -95, 49, 49, 77, 0, 0<o:p></o:p></p><p class=MsoNormal>When that&#8217;s used, it will come back in Proj4 format as:<o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt;line-height:115%;font-family:"Verdana","sans-serif"'>+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;line-height:115%;font-family:"Verdana","sans-serif"'>However, if I&nbsp; start with the above Proj4 format string and ask for it back, I get<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal'><span style='font-size:10.0pt;font-family:"Courier New"'>+proj=lcc +lat_1=49 +lat_0=49 +lon_0=-95 +k_0=1 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>You can see that the lat_2 parameter is no longer to be found&#8230;<o:p></o:p></p><p class=MsoNormal>After poking around in the source code, I&#8217;ve found a difference between two routines that handle importing coordinate systems.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>gdal-1.8.0\ogr\ogrsf_frmts\mitab\mitab_coordsys.cpp has code<o:p></o:p></p><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:green'>/*--------------------------------------------------------------</span><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:green'>&nbsp;*&nbsp;Lambert&nbsp;Conic&nbsp;Conformal</span><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:green'>&nbsp;*-------------------------------------------------------------*/</span><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:blue'>case</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;3:<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poSR-&gt;SetLCC(&nbsp;GetMIFParm(&nbsp;papszNextField,&nbsp;2,&nbsp;0.0&nbsp;),<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetMIFParm(&nbsp;papszNextField,&nbsp;3,&nbsp;0.0&nbsp;),<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetMIFParm(&nbsp;papszNextField,&nbsp;1,&nbsp;0.0&nbsp;),<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetMIFParm(&nbsp;papszNextField,&nbsp;0,&nbsp;0.0&nbsp;),<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetMIFParm(&nbsp;papszNextField,&nbsp;4,&nbsp;0.0&nbsp;),<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetMIFParm(&nbsp;papszNextField,&nbsp;5,&nbsp;0.0&nbsp;)&nbsp;);<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:12.0pt;font-family:Consolas;color:blue'>break</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o:p></span></pre><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>however, in&nbsp; \gdal-1.8.0\ogr\ogr_srs_proj4.cpp the code is:<o:p></o:p></p><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:blue'>else</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:blue'>if</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(&nbsp;EQUAL(pszProj,</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lcc&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>)&nbsp;)&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;{<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:blue'>if</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>(&nbsp;OSR_GDV(papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lat_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;)&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;==&nbsp;OSR_GDV(papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lat_1&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;)&nbsp;)<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:green'>/*&nbsp;1SP&nbsp;form&nbsp;*/</span><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetLCC1SP(&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lat_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lon_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;k_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;1.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;x_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;y_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;)&nbsp;);<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:blue'>else</span><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:green'>/*&nbsp;2SP&nbsp;form&nbsp;*/</span><span style='font-size:12.0pt;font-family:Consolas;color:black'><o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetLCC(&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lat_1&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lat_2&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lat_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;lon_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;x_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;),&nbsp;<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSR_GDV(&nbsp;papszNV,&nbsp;</span><span style='font-size:12.0pt;font-family:Consolas;color:#A31515'>&quot;y_0&quot;</span><span style='font-size:12.0pt;font-family:Consolas;color:black'>,&nbsp;0.0&nbsp;)&nbsp;);<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<o:p></o:p></span></pre><pre style='background:white'><span style='font-size:12.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;}<o:p></o:p></span></pre><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>As far as I can figure, these are the two spots that are setting up the internals for the coordinate system, and they&#8217;re not quite doing it the same.<o:p></o:p></p><p class=MsoNormal>I just don&#8217;t know enough about the Lambert Conformal Conic coordinate system any more to tell if I should tweak the MapInfo import routine or the proj4 import routine.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>So I thought I&#8217;d throw this out there and see what the experts had to say.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Andy<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>