[FWTools] gdal translate - air photo seems washed out after converting image

Mark Volz MarkVolz at co.lyon.mn.us
Thu Jul 11 09:07:17 EST 2013


I partially figured it out, but I still could use some help.

The problem that I had was not with the created image itself, but how ESRI displayed it.  By default ArcMap uses no stretch to display the SID image while it uses a percent clip stretch for the created tif .  After I changed the stretch from percent clip to none the images appeared almost the same, but there was still some differences.  Next, I changed the stretch to minimum-maximum on the created tif image and  I could not tell any difference between the sid file and the tif image.


1)      When creating a tiff file in gdal_translate, can I adjust settings so that the new image will appear exactly like the old image without having to turn stretch to minimum-maximum?

2)      Is there a way in mapserver to change the stretch from none to minimum maximum (or other types of stretches if desired) and if so is there a performance hit?

3)      Is there a way to modify a tiff file so that any GIS program including ArcGIS that opens up the file will use the correct stretch type, or is there a setting within ArcGIS that will always use a certain type of stretch when it opens up tiff images?


Mark Volz, GISP
GIS Specialist

From: Richard Greenwood [mailto:richard.greenwood at gmail.com]
Sent: Wednesday, July 10, 2013 6:32 PM
To: Mark Volz
Cc: fwtools at lists.maptools.org
Subject: Re: [FWTools] gdal translate - air photo seems washed out after converting image

On Wed, Jul 10, 2013 at 3:08 PM, Mark Volz <MarkVolz at co.lyon.mn.us<mailto:MarkVolz at co.lyon.mn.us>> wrote:

I converted a mr sid air photo to a tif file.  The colors appear washed out and too bright compared to the mr sid file.

I would like to create an image file that has the following three characteristics:

1) Fast for Mapserver to read.
2) Relatively the same size as the MrSID file.  - I would prefer a file size that is no larger than twice the size of the Mr SID file, even if it means that I have to take a small hit by using compression
3) retains the same image quality as the original MrSID file

The following two commands made the image fast for mapserver, and relatively small.  But the colors were washed out...

c:\ms4w\apps\PipestoneMaps\Raster\Picto2013>gdal_translate -CO TILED=YES -CO PHOTOMETRIC=YCBCR -CO TFW=YES -CO COMPRESS=JPEG -CO BIGTIFF=YES MNPIPE13-SID-9INCH.sid New.tif
c:\ms4w\apps\PipestoneMaps\Raster\Picto2013>gdaladdo -r average --config compress_overview JPEG --config photometric_overview YCBCR New.tif 2 4 8 16 32 64 128 256

What can I do to improve the image quality, while retaining the speed and a moderate file size?


Mark Volz, GISP
GIS Specialist

Those are pretty much the commands that I regularly use to prepare imagery for mapserver. I have never experienced any noticeable color distortion. What does it look like with a straight
   gdal_translate MNPIPE13-SID-9INCH.sid New.tif
obviously that's not what you want for a final product, but it would be my first step toward 'debugging' the problem.


Richard Greenwood
richard.greenwood at gmail.com<mailto:richard.greenwood at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20130711/9f3a490a/attachment.htm 

More information about the FWTools mailing list