GDAL RasterLayer poor image quality

Editor
Jun 11, 2014 at 5:26 PM
Hi Guys,

I'm loading a large (400meg) tif into sharpmap using the gdal raster layer.

It is loading fine but I noticed that the image quailty is pretty poor when compared to something like windows preview.

Is there anyway to improve this? I'm not too bothered about performance as I want to use this layer to create a tile cache so that I can load it using a TileLayer.

Ideas?

Thanks,
Editor
Jun 11, 2014 at 5:33 PM
Hi Guys,

I thought I would just check in QGIS as well and it looks exactly the same, so I assume it something to do with GDAL. I wonder if its the pyramid layers in the file itself? I think they can be built using different resampling methods so it might have been built with the most basic one leading to the grainy look?

Anyone have experience of this?
Coordinator
Jun 12, 2014 at 8:56 AM
I think it has to do with the down-sampling algorithm used in GDAL (nearest neighbor). I don't know if there is a way you can change that.
Editor
Jun 12, 2014 at 9:33 AM
As I suspected it is to do with the pyramid layers in the tif image. At the point I posted this, it did not have any pyramid layers set. Using QGIS it is quite easy to open the image, open its properties and create the pyramid layer using various different techniques. I found 'Average' option produced the smoothest image, but probably best to experiment.

This pyramid creation can also be done via command line using GDAL, so it would be possible to do without QGIS.