Does cubic spline resampling give the best quality? I know that it is the slowest.<br><br>Thanks,<br><br>John Mitchell<br><br><div><span class="gmail_quote">On 1/5/07, <b class="gmail_sendername">Frank Warmerdam</b> <<a href="mailto:warmerdam@pobox.com">
warmerdam@pobox.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Craig Miller wrote:<br>> I've been using gdalwarp to reproject USGS quads (single band geotif images
<br>> with color table) from UTM zone 10/11 to geographic (EPSG:4326). If I use<br>> nearest neighbor sampling (-rn) the color table gets translated correctly,<br>> but if I use bilinear, cubic, or cubic spline resampling the color table is
<br>> corrupted. For example, blue water turns brown. As nearest neighbor<br>> sampling doesn't always offer up the smoothest results I'm hoping to get<br>> cubic spline resampling working. Any suggestions on how to get this working
<br>> w/o corrupting my color table?<br>><br>> I'm using gdal out of CVS from a couple of weeks ago.<br>><br>> Gdalwarp -rcs -co "COMPRESS=LZW" -co "TILED=YES" -wo "INIT_DEST=NO_DATA"
<br>> -t_srs EPSG:4326 infile.tif ..\geo\outfile.tif<br>><br>> I'd be happy to provide sample images, but they are a bit large so I didn't<br>> want to send them to the list.<br><br>Craig,<br><br>The actual resampling algorithms don't (and can't really be expected) to
<br>operate in colormap color space. Instead they just operate on the raw<br>pixel values. If you want to use a "non-ramp" color table with resampling<br>types other than nearest neighbour you will really need to first convert
<br>your image to 24bit RGB.<br><br>eg.<br><br>pct2rgb.py infile.tif infile_rgb.tif<br><br>Then operate on that with other resampling techniques.<br><br>Best regards,<br>--<br>---------------------------------------+--------------------------------------
<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam
</a><br>and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org">http://osgeo.org</a><br><br>_______________________________________________<br>Gdal-dev mailing list<br><a href="mailto:Gdal-dev@lists.maptools.org">
Gdal-dev@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/gdal-dev">http://lists.maptools.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>John J. Mitchell