converted images do not display correctly

classic Classic list List threaded Threaded
1 message Options
bclay bclay
Reply | Threaded
Open this post in threaded view

converted images do not display correctly

I am working with some ECW images downloaded from the internet.  Due to our system configuration we can not load the ECW files although they do all display correctly in QGis which appears to be osgEarth based.  We converted the images from ECW to geoTiff.  the firswt method used was

gdal_translate -of GTiff ^
        ./hires/SU50ne/Ortho_P00078302_20160719_20160719_20cm_res.ecw ^

but this created images that appeared transparent in osgEarth.

The second method we used

convert the ECW RGB file to file with color table

CALL rgb2pct -of GTiff ^
        ./Portsmouth_UK_hires/SU50ne/Ortho_P00078302_20160719_20160719_20cm_res.ecw ^
change the SRID of the output file to WGS 84 and clip image size to 4 byte multiple

gdalwarp  -of GTiff  -overwrite -s_srs EPSG:27700 -t_srs EPSG:4326 -ts 6072 3848  ^
        ./hires_tif_pct/SU50ne/Ortho_P00078302_20160719_20160719_20cm_res.tif ^

This is the method used internal to QGis to convert the images.  While it does work to convert all of the images and they appear correctly in Windows Explorer some of them appear correctly in osgEarth but most of them do not.  The attached image shows two adjacent images.  I tried various clipping parameters to trim the images since some of them originally had an odd number of rows or columns.  That seemed to change which appeared correctly but it did not get all of them with any combination.  Also, when the images are displayed in QGis the border between the images is not apparent but it is very apparent in osgEarth.

System is Windows 7,  OpenSceneGraph 3.4, osgearth 2.9.0 Development

Any suggestions would be greatly appreciated.