<div class="gmail_quote">I have found that the existing MrSID gdal driver will ignore j2w files for geotransform information if present with JPEG2000 formatted files.<div><br></div><div>While symlinking the j2w files to sdw is an option, adding code to look for and use a j2w files is simple and seemingly useful.</div>

<div><br></div><div>I added and tested such code to</div><div><br></div><div><h1 style="font-family:Arial,Verdana,&#39;Bitstream Vera Sans&#39;,Helvetica,sans-serif;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0.5em;padding-left:0px">

<a title="View trunk" href="http://trac.osgeo.org/gdal/browser/trunk" style="text-decoration:none;border-bottom-style:none;border-top-style:none;border-right-style:none;border-left-style:none;padding-top:0px;padding-right:0.2em;padding-bottom:0px;padding-left:0.2em;border-width:initial;border-color:initial;float:left" target="_blank"><span style><font color="#330033">trunk</font></span></a><span style="padding-top:0px;padding-right:0.1em;padding-bottom:0px;padding-left:0.1em;float:left"><span style><font color="#330033">/</font></span></span><a title="View gdal" href="http://trac.osgeo.org/gdal/browser/trunk/gdal" style="text-decoration:none;border-bottom-style:none;border-top-style:none;border-right-style:none;border-left-style:none;padding-top:0px;padding-right:0.2em;padding-bottom:0px;padding-left:0.2em;border-width:initial;border-color:initial;float:left" target="_blank"><span style><font color="#330033">gdal</font></span></a><span style="padding-top:0px;padding-right:0.1em;padding-bottom:0px;padding-left:0.1em;float:left"><span style><font color="#330033">/</font></span></span><a title="View frmts" href="http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts" style="text-decoration:none;border-bottom-style:none;border-top-style:none;border-right-style:none;border-left-style:none;padding-top:0px;padding-right:0.2em;padding-bottom:0px;padding-left:0.2em;border-width:initial;border-color:initial;float:left" target="_blank"><span style><font color="#330033">frmts</font></span></a><span style="padding-top:0px;padding-right:0.1em;padding-bottom:0px;padding-left:0.1em;float:left"><span style><font color="#330033">/</font></span></span><a title="View mrsid" href="http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/mrsid" style="text-decoration:none;border-bottom-style:none;border-top-style:none;border-right-style:none;border-left-style:none;padding-top:0px;padding-right:0.2em;padding-bottom:0px;padding-left:0.2em;border-width:initial;border-color:initial;float:left" target="_blank"><span style><font color="#330033">mrsid</font></span></a><span style="padding-top:0px;padding-right:0.1em;padding-bottom:0px;padding-left:0.1em;float:left"><span style><font color="#330033">/</font></span></span><a title="View mrsiddataset.cpp" href="http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/mrsid/mrsiddataset.cpp" style="text-decoration:none;border-bottom-style:none;border-top-style:none;border-right-style:none;border-left-style:none;padding-top:0px;padding-right:0.2em;padding-bottom:0px;padding-left:0.2em;border-width:initial;border-color:initial;float:left" target="_blank"><span style><font color="#330033">mrsiddataset.cpp</font></span></a><div style="font-size:19px">

<br></div></h1><div>at line 1311 </div><div><br></div><div><span style="font-family:monospace;font-size:11px;font-weight:bold">||</span><span style="font-size:11px;font-family:monospace"> GDALReadWorldFile</span><span style="font-family:monospace;font-size:11px">(</span><span style="font-size:11px;font-family:monospace"> GetDescription</span><span style="font-family:monospace;font-size:11px">(),</span><span style="font-size:11px;font-family:monospace"> </span><span style="font-family:monospace;font-size:11px;color:rgb(187,136,68)">&quot;.j2w&quot;</span><span style="font-family:monospace;font-size:11px">,</span></div>

<div><span style="font-size:11px;font-family:monospace">                      adfGeoTransform</span><span style="font-size:11px;font-family:monospace"> </span><span style="font-family:monospace;font-size:11px">)</span></div>

<div><span style="font-family:monospace;font-size:11px"><br></span></div><div><span style="font-family:monospace;font-size:11px"><br></span></div><div><span><font face="arial, helvetica, sans-serif">and this change appears to do the right thing with j2w files.  Please consider integrating this change into the next gdal release.</font></span></div>

<div><span><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span><font face="arial, helvetica, sans-serif">Best,</font></span></div><span class="HOEnZb"><font color="#888888"><div><span style="font-family:monospace;font-size:11px"><br>

</span></div><div></div><div><font face="Verdana, Arial, &#39;Bitstream Vera Sans&#39;, Helvetica, sans-serif"><span style="font-size:12px;line-height:15px"><br></span></font></div>-- <br>John Novak<br><br><br>
</font></span></div>
</div><br><br clear="all"><div><br></div>-- <br>John Novak<br>Novacell Technologies and the Old Topo Depot<br><a href="http://www.novacell.com" target="_blank">http://www.novacell.com</a><br>585-OLD-TOPOS (585-653-8676)<br>
<br>