[gdal-dev] pixel/line mapping for two images.

Belaid MOA belaid_moa at hotmail.com
Wed Sep 16 15:39:20 EDT 2009



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.Barker at noaa.gov
> Subject: Re: [gdal-dev] pixel/line mapping for two images.
> To: belaid_moa at hotmail.com; gdal-dev at 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.Barker at noaa.gov
> 

_________________________________________________________________
New! Faster Messenger access on the new MSN homepage
http://go.microsoft.com/?linkid=9677406
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090916/3e05b2b1/attachment.html


More information about the gdal-dev mailing list