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