<div dir="ltr"><div><div>The last days I've been trying to convert my ecw file to a GeoTiff so I can use it in Geoserver.<br></div>The ecw is a mozaik of aerial photos.<br></div>When I do these two commands it is working in Geoserver:<br>

<ul><li><span style="font-family:courier new,monospace">gdal_translate -of GTiff -co tiled=yes -co compress=jpeg -co photometric=YCBCR -a_srs EPSG:28992 -co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" my.ecw my.tif </span></li>

<li><span style="font-family:courier new,monospace">gdaladdo -r average --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR  my.tif 2 4 8 16 32 64 128</span></li></ul><div><div><div><div>
But I want to add a second reference layer beneath this one which is larger. The translated ecw has white edges, so that is not looking nice.<br></div><div>I've asked about this before and suggested was to use a cutline. So I create a polygon that is inside the ecw file and ran this command:<br>

<ul><li><span style="font-family:courier new,monospace">gdalwarp -multi -cutline "clip.shp" -of GTiff -co tiled=yes -co compress=jpeg -co photometric=YCBCR -co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" -s_srs EPSG:28992 -r lanczos -overwrite my.ecw clipped.tif</span></li>

</ul></div><div>When I open clipped.tif in MapWindow I can see the white edges are gone. But when I call <i>gdaladdo</i> white artifacts are back again.<br></div><div>I'm now in the process of calling <i>nearblack</i> on both my.tiff and clipped.tif but I'm not sure I'm doing it right. I think I'm using the correct commands but perhaps in the wrong order.<br>

</div><div>The ecw file isn't very large (2.6GB) but all steps take a long time, especially <i>nearblack </i>which is running for 4 hours now and is just at 10%.<br><br></div><div>Does anybody have some suggestions how to process the steps to convert an ecw file which has white outside areas to a transparent tif file with overviews?<br>

</div><div><br></div><div>I'm running the latest GDAL v1.10 version from Tamas on Windows Vista on a 8GB 4core machine. Speed is not a big issue when I know the result will be OK.<br><br></div><div>Thanks,<br></div><div>

<br>
Paul<br>
</div>
</div></div></div></div>