<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks for the reply. This does improve the output (cubicspline works best), but still not great. So I increased the raster size by 10x and end up with an output of 500mb in size, which is difficult to work with.<br><br>Any other suggestions gratefully received.<br><br><br>> Date: Mon, 5 Oct 2009 17:03:04 +0200<br>> From: nowak@xpam.de<br>> To: chrisemberson@hotmail.com<br>> CC: chaitanya.ch@gmail.com; gdal-dev@lists.osgeo.org<br>> Subject: Re: [gdal-dev] Anti-Aliasing<br>> <br>> Chris Emberson wrote:<br>> > The rasters do have colour tables applied, that are expressed using RGB <br>> > values, using gdaldem:<br>> > 75% 107 0 0<br>> > 50% 196 109 27<br>> > 25% 247 195 72<br>> > 0% 252 233 109<br>> > nv 0 0 0 0<br>> > <br>> > They are not derived from vector data however. I am unsure of your <br>> > requirement in terms of the source of the raster data. All of the pixel <br>> > values have been created and either fall between the values of 1-4 or <br>> > contain no data.<br>> > <br>> > The commands I am running on the files are:<br>> > gdal_translate -of GTiff -co "TILED=YES" -b 1 -b 1 -b 1 fileA.asc fileB.tif<br>> <br>> Upsample fileB.tif here:<br>> gdalwarp -r bilinear -ts newwidth newheight fileB.tif fileB2.tif<br>> Where newwidth and newheight are a few times larger than original.<br>> <br>> > gdaldem color-relief fileB.tif rgb.txt fileC.tif -alpha<br>> > gdalwarp -s_srs EPSG:27700 -t_srs EPSG:900913 -r bilinear fileC.tif <br>> > fileD.tif<br>> > <br>> > an example of how the bilinear is working (fileD.tif) can be seen in the <br>> > attached file. I have tried running running the gdalwarp command above <br>> > prior to gdaldem but this makes little difference.<br>> > <br>> > TIA,<br>> > Chris<br>> > <br>> > <br>> > <br>> > > Date: Mon, 5 Oct 2009 16:46:55 +0530<br>> > > Subject: Re: [gdal-dev] Anti-Aliasing<br>> > > From: chaitanya.ch@gmail.com<br>> > > To: chrisemberson@hotmail.com<br>> > > CC: seth@pricepages.org; gdal-dev@lists.osgeo.org<br>> > ><br>> > > Chris,<br>> > ><br>> > > The images look like they have a colour table instead of RGB bands.<br>> > > Also, they seem to be converted from vector to raster. Correct me if I<br>> > > am wrong.<br>> > ><br>> > > Anti aliasing images with colour tables is a little more involved and<br>> > > depends on the type of result required. Can you provide the source for<br>> > > these images?<br>> > ><br>> > > One method would be to convert the image into RGB, apply bilinear or<br>> > > any other interpolation method, and convert it back to the colour<br>> > > table from RGB. If the source is a vector, we can smooth the shapes by<br>> > > using curves in place of straight lines.<br>> > ><br>> > > On Mon, Oct 5, 2009 at 3:59 PM, Chris Emberson<br>> > > <chrisemberson@hotmail.com> wrote:<br>> > > > Seth,<br>> > > ><br>> > > > Thanks for the reply. The attached image hopefully will clarify the <br>> > problem<br>> > > > I am having. On the left of the image is the output I would like (I <br>> > have<br>> > > > produced this using a GIS). On the right is the output using mapnik and<br>> > > > gdal. The problem is the pixellated effect between the raster <br>> > values on the<br>> > > > RHS.<br>> > > ><br>> > > > The GIS isn't that great as far as batch processing is concerned, <br>> > hence why<br>> > > > I am trying to use the GDAL utilities that ship with mapnik. The <br>> > option in<br>> > > > the GIS that produces the desired effect is "anti-aliasing (bilinear<br>> > > > interpolation)", but it appears as though there is a more sophisticated<br>> > > > smoothing algorithm being employed? I have tried running the various<br>> > > > interpolation techniques with gdalwarp but none of them produce a crisp<br>> > > > output. I have tried also increasing the resolution of the raster by 5x<br>> > > > (both width and height) using "gdal_translate" and "-outsize 500% <br>> > 500%"<br>> > > > this doesn't help either.<br>> > > ><br>> > > > Any suggestions gratefully received,<br>> > > ><br>> > > > Chris<br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > >> Date: Fri, 2 Oct 2009 12:36:24 -0500<br>> > > >> Subject: Re: [gdal-dev] Anti-Aliasing<br>> > > >> From: seth@pricepages.org<br>> > > >> To: chrisemberson@hotmail.com<br>> > > >> CC: gdal-dev@lists.osgeo.org<br>> > > >><br>> > > >> Could you give an example of the problem? Anti-aliasing generally only<br>> > > >> applies when you are going from vector line drawings to rasterized <br>> > images.<br>> > > >><br>> > > >> If I was trying to smooth things I would first look at cubic or <br>> > bilinear.<br>> > > >> Any other resampling may enhance any noise in your image.<br>> > > >> ~Seth<br>> > > >><br>> > > >> On Fri, October 2, 2009 11:16 am, Chris Emberson wrote:<br>> > > >> ><br>> > > >> > I am looking for an anti-aliasing function to smooth out the <br>> > pixellated<br>> > > >> > effect between raster values. I have tried the various interpolation<br>> > > >> > methods with gdalwarp and have also increased the resolution of the<br>> > > >> > raster<br>> > > >> > to try and minimise the effect, to no avail.<br>> > > >> > Is this a function to be added soon?<br>> > > >> ><br>> > > >> > Thanks,<br>> > > >> > Chris<br>> > > >> ><br>> > > >> > _________________________________________________________________<br>> > > >> > Share your photos with Windows Live Photos – Free.<br>> > > >> ><br>> > > >> > <br>> > http://clk.atdmt.com/UKM/go/134665338/direct/01/_______________________________________________<br>> > > >> > gdal-dev mailing list<br>> > > >> > gdal-dev@lists.osgeo.org<br>> > > >> > http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>> > > >><br>> > > >><br>> > > ><br>> > > > ________________________________<br>> > > > New! Receive and respond to mail from other email accounts from within<br>> > > > Hotmail Find out how.<br>> > > > _______________________________________________<br>> > > > gdal-dev mailing list<br>> > > > gdal-dev@lists.osgeo.org<br>> > > > http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>> > > ><br>> > ><br>> > ><br>> > ><br>> > > --<br>> > > Best regards,<br>> > > Chaitanya kumar CH.<br>> > <br>> > ------------------------------------------------------------------------<br>> > Add other email accounts to Hotmail in 3 easy steps. Find out how. <br>> > <http://clk.atdmt.com/UKM/go/167688463/direct/01/><br>> > ------------------------------------------------------------------------<br>> > <br>> > <br>> > ------------------------------------------------------------------------<br>> > <br>> > _______________________________________________<br>> > gdal-dev mailing list<br>> > gdal-dev@lists.osgeo.org<br>> > http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>> <br>                                            <br /><hr />Add other email accounts to Hotmail in 3 easy steps. <a href='http://clk.atdmt.com/UKM/go/167688463/direct/01/' target='_new'>Find out how.</a></body>
</html>