[Gdal-dev] Re: Resampling With GDAL

Matt Wilkie matt.wilkie at gov.yk.ca
Tue Apr 24 13:15:47 EDT 2007


Mike Richardson wrote:
> Thanks for the upgrade! [I hope this is the right way to reply to the 
> thread... new this system!]

"the right way": It's pretty much ReplyAll for stuff that adds value to 
the thread, (might be useful for those searching the archives and 
whatnot) and ReplySender for chitchat. But really it's whatever feels 
right to you.


> Another caveat: this technique does not work on paletted images. 
> True-color only.

For indexed images change the resampling to nearest neighbour (-rn) 
rather than bilinear, cubic or cubic spline (-rb, -rc, -rcs):

    gdalwarp -q -rn -ts %%a %%a !tmpFile! xx_%%a_%inFile%

Oops, I made a mistake in the NiceResample.cmd I posted earlier, 
neglecting to specify the resampling kernel at all.

cheers,

-- 
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------




More information about the Gdal-dev mailing list