<div dir="ltr"><div>While writing this, I figured put most of the problems, so this note will be more about suggestion in making the documentation more usable.<br></div><div><br></div>I am going to receive an amount of ecw files that, for whatever reason, do not contain the georeferenced information.<div><br></div><div>For the first image received, gdalinfo shows the following:</div><div><br></div><div><div>Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)</div><div>Files: 1989.423C_42348.5000.ecw</div><div>Size is 8001, 6001</div><div>Coordinate System is `'</div><div>Metadata:</div><div>  COLORSPACE=GREYSCALE</div><div>  COMPRESSION_RATE_TARGET=5</div><div>  VERSION=2</div><div>Corner Coordinates:</div><div>Upper Left  (    0.0,    0.0)</div><div>Lower Left  (    0.0, 6001.0)</div><div>Upper Right ( 8001.0,    0.0)</div><div>Lower Right ( 8001.0, 6001.0)</div><div>Center      ( 4000.5, 3000.5)</div><div>Band 1 Block=256x256 Type=Byte, ColorInterp=Gray</div><div>  Description = Grayscale</div><div>  Overviews: 4000x3000, 2000x1500, 1000x750, 500x375, 250x187</div></div><div><br></div><div>Since I know the position, I did the following:</div><div><br></div><div>1) gdal_translate -of GTiff -a_nodata 135 -a_srs EPSG:3068 -a_ullr 20800 22000 24000 19600 1989.423C_42348.5000.ecw 1989.423C_42348.5000.3068.tif<br></div><div><br></div><div>2) gdal_translate -of ECW -co TARGET=0 -a_srs EPSG:3068 1989.423C_42348.5000.3068.tif 1989.423C_42348.5000.3068.tif.ecw<br></div><div><br></div><div>gdalinfo now shows the projection information.</div><div>- but with 'COMPRESSION_RATE_TARGET=1' instead of 5</div><div>-- no doubt due to the '-co TARGET=0' (which I have no idea what it means)</div><div><br></div><div>gdal_translate has a note with the '-co'<br></div><div>'<span style="color:rgb(0,0,0);font-family:roboto,sans-serif;font-size:14px;line-height:22px">See format specific documentation for legal creation options for each format'</span></div><div><span style="color:rgb(0,0,0);font-family:roboto,sans-serif;font-size:14px;line-height:22px">a: </span><span style="font-size:medium;color:rgb(136,18,128);font-family:monospace;white-space:pre-wrap"><a </span><span class="gmail-html-attribute-name" style="font-size:medium;font-family:monospace;white-space:pre-wrap">href</span><span style="font-size:medium;color:rgb(136,18,128);font-family:monospace;white-space:pre-wrap">="</span><font color="#881280" face="monospace" size="3"><span style="white-space:pre-wrap"><a href="http://www.gdal.org/formats_list.html">http://www.gdal.org/formats_list.html</a>"></span></font><span style="color:rgb(0,0,0);font-family:roboto,sans-serif;font-size:14px;line-height:22px">See format specific documentation for legal creation options for each format</a></span></div><div><span style="color:rgb(0,0,0);font-family:roboto,sans-serif;font-size:14px;line-height:22px">which then leads to </span><font color="#000000" face="roboto, sans-serif"><span style="font-size:14px;line-height:22px"><a href="http://www.gdal.org/frmt_ecw.html">http://www.gdal.org/frmt_ecw.html</a></span></font></div><div><font color="#000000" face="roboto, sans-serif"><span style="font-size:14px;line-height:22px">- where TARGET is then explained (percentage)</span></font></div><div><font color="#000000" face="roboto, sans-serif"><span style="font-size:14px;line-height:22px">-- but no explanation on what '</span></font>COMPRESSION_RATE_TARGET' is</div><div>---> '-co TARGET=50' (percent) = 'COMPRESSION_RATE_TARGET=2'</div><div>---> '-co TARGET=75' (percent) = 'COMPRESSION_RATE_TARGET=4'<br></div><div>---> '-co TARGET=99.99' (percent) = 'COMPRESSION_RATE_TARGET=9997'<br></div><div>A comparison chart would be useful here<br></div><div>- comparing what gdalinfo shows to what gdal_translate needs</div><div>(I still do not know what TARGET setting is needed to get COMPRESSION_RATE_TARGET=5)</div><div><br></div><div>What I would like to know is: can gdal_edit.py be used to achieve the same result?</div><div>- base on another found sample, I worked this out, since I have never used the combination -a_srs/-a_ullr before</div><div>-- wasted a lot of time in the past creating a world-file for this task</div><div><br></div><div>gdal_edit  -a_srs EPSG:3068 -a_ullr 20800 22000 24000 19600 1989.423C_42348.5000.ecw<br></div><div><br></div><div>So for both 'gdal_translate' and 'gdal_edit' a practical sample to set the missing georeferenced information would be useful</div><div>- while searching I saw a lot of reports of people receiving ecw file 'raw' and wondering how to get it in</div><div><br></div><div>Once one knows it, it is easy</div><div>But it has be hours since I found this sample:</div><div>gdal_edit -mo DATUM=WGS84 -mo PROJ=GEODETIC -a_ullr 7 47 8 46 test.ecw<br></div><div><br></div><div>and trying to adapt it to work with a non-wsg84 system.</div><div><br></div><div>Mark Johnson, Berlin Germany</div><div><br></div><div><br></div><div><br></div><div><br></div></div>