<html><head><base href="x-msg://34/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>First, instead of using GDAL 1.6.0 from December 2008, why not use GDAL 1.7.2 from April 2010?</div><div>Second, since your objective is to create a tiled GeoTIFF, you can do that with one gdal_translate command.</div><div><div>$ gdal_translate --version</div><div>GDAL 1.7.2, released 2010/04/23</div><div>$ gdal_translate -of GTiff -ot Byte -co Compress=NONE \</div><div>-co TILED=YES -co BLOCKXSIZE=256 -co BLOCKXSIZE=256 \</div><div>18stj940125.if 18stj940125_gdal_translate.tif</div><div>Input file size is 5000, 5000</div><div>0...10...20...30...40...50...60...70...80...90...100 - done.</div></div><div>Greg</div><br><div><div>On Jul 29, 2010, at 2:50 AM, Brett Walker wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-AU" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">I’m trying to produce a tile matrix set from geocoded tiffs using gdal2tiles.py but I am having trouble with the last step in the process.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">As an example I have a BSB file from NOAA which is a navigational map of Lake Pend Oreille in Idaho. The map has a SRS of WGS84 and a Mercator projection.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">I initially translate the file from BSB format to GTiff format using the following command:<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> gdal_translate -of GTiff noaa\18554_1.kap noaa.tif<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">I can view this GTiff file using Paint Shop Pro quite fine. I then translate the file from GTiff format to VRT format using the following command:<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> gdal_translate -of vrt –expand rgba noaa\noaa.tif noaa\noaa.vrt<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">I then try to generate a tile matrix set using the following command:<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> gdal2tiles.py noaa\noaa.vrt noaa<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">But get the follwoing error:<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> ERROR 1: failed to load NAD27-83 correction file<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> ERROR 1: GDALSuggestedWarpOutput() failed because the passed<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> transformer failed.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> usage: Usage: gdal2tiles.py [options] input_file(s) [output]<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">><o:p> </o:p></span></div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 36pt; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">> gdal2tiles.py: error: Size of the pixel in the output differ for X and Y axes.<o:p></o:p></span></p><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Am I missing something?<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">My system is Windows Vista (32-bit). I’m using GDAL v1.6.0 win32 binary, GDAL v1.6.0 python package, PROJ4 v4.4.6 win32 binary, NumPy v1.2.1 for win32 and Python v2.4.1<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">I have set all the appropriate system variables and copied files to approprate locations. This was done following the guidelinse at<a href="http://www.gis.usu.edu/~chrisg/python/2009/docs/gdal_win.pdf" style="color: blue; text-decoration: underline; ">http://www.gis.usu.edu/~chrisg/python/2009/docs/gdal_win.pdf</a><span class="Apple-converted-space"> </span>except that I omitted steps 3f and 3g.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Hope you can help.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Brett</span></div></div></div></blockquote></div></body></html>