<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>Thank you very much very much Chris for clarifying things. Could you please let me know which file contains the anti-aliasing code?<br>I did the arithmetic to compute the overlap but somehow I keep getting non-smooth areas <br>(areas with very sharp boundaries). The spatial resolution of the source image is so high that the source pixel is never <br>shared between two pixels in the destination image (according to my arithmetic ). Is this suppose to be the case? <br>The anti-aliasing code will help me to check my arithmetic. <br><br>With best regards.<br>Belaid Moa.<br><br> <br><br>> Date: Wed, 16 Sep 2009 09:58:31 -0700<br>> From: Chris.Barker@noaa.gov<br>> Subject: Re: [gdal-dev] pixel/line mapping for two images.<br>> To: belaid_moa@hotmail.com; gdal-dev@lists.osgeo.org<br>> <br>> Belaid MOA wrote:<br>> > Thanks for the reply. I do not see how anti-aliasing techniques could be <br>> > used here.<br>> <br>> anti-aliasing when warping rasters requires computing how much the <br>> pixels of the source and destination overlap each-other.<br>> <br>> > Does anyone else have simple answers to the two elementary questions?<br>> <br>> sure:<br>> <br>> > > > According to GDAL code, a pixel/line (i,j), more precisely its center<br>> > > > (i+0.5,j+0.5), of the first image is mapped to the pixel/line (p,q) <br>> > of the<br>> > > > second image, where p and q are doubles that usually have fraction <br>> > parts.<br>> > > > My questions are: what is the meaning for these fractions?<br>> <br>> the point in the middle of a pixel in the source raster represents a <br>> particular lat-long location -- p and q are the location in the second <br>> image for the same lat-long -- chances are slim that it's going to land <br>> exactly on a pixel boundary, hence the fraction. Just like the middle of <br>> the source pixel is i+0.5, j+0.5, the middle of a destination pixel <br>> would be p+0.5, q+0.5.<br>> <br>> > Is it possible to use these fractions to compute the overlap between<br>> > the pixels of the two images using GDAL?<br>> <br>> yup -- think about the above, and do a little arithmatic (which i s the <br>> arithmetic done in the anti-aliasing code.<br>> <br>> HTH,<br>> <br>> -Chris<br>> <br>> <br>> <br>> -- <br>> Christopher Barker, Ph.D.<br>> Oceanographer<br>> <br>> Emergency Response Division<br>> NOAA/NOS/OR&R (206) 526-6959 voice<br>> 7600 Sand Point Way NE (206) 526-6329 fax<br>> Seattle, WA 98115 (206) 526-6317 main reception<br>> <br>> Chris.Barker@noaa.gov<br>> <br><br /><hr />New! Hotmail sign-in on the <a href='http://go.microsoft.com/?linkid=9677401' target='_new'>MSN homepage.</a></body>
</html>