[Gdal-dev] Resampling with gdalwarp

Frank Warmerdam warmerdam at pobox.com
Sun Mar 28 23:29:19 EST 2004


Sandy Pyke wrote:
> Hi Frank,
> 
> I've also noticed the same thing in my application. Here are a few
> sample images:
> 
> http://halibut.aquilamsl.com/~spyke/resampling 
> 
> I resampled the images with both GraphicsMagik and GDALWarp. The GDAL
> result shows breaks in many of the small features and even the loss of
> some data entirely. The resulting map is usable, but not ideal.
> 
> In my case I am only making a correction to the map's aspect ratio going
> from a source image size of 3200 x 1600 to a destination image size of
> 2640 x 1879 which means downsampling (82.5%) in one direction and
> upsampling (117.4%) in the other. This is so I can adjust the pixels
> from being square in lon / lat values to being square in meters, which
> falls closer into what you expected GDALWarp to do as I understand. Even
> so, I am seeing a loss of data. Best case, I loose a bit of data, worst
> case the data get mis-interpreted (ie: solid lines become dashed lines).

Sandy,

Sorry for my delay in responding.  Intersting questions that I can't think
of a good answer for right away often slide down below my email event
horizon where I found this message while digging around for other stuff.

I must confess that while I see what you are saying, I don't have any
plans for what to do about it.

> I would also like to see some improvement in this re-sampling algorithm.
> There are a few algorithm switches available in the GDALWarp command
> line options, but the documentation mentions that only the bilinear
> re-sampling is available. Is this still the case in 1.2.0?

There should be support for 4 resampling kernels in GDAL.  They are nearest
neighbour, bilinear and two forms of cubic convolution.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list