rectangular_overlap_grid(xmin, xmax, ymin, ymax, nx, ny, width, height, use_exact, subpixels)¶
Area of overlap between a rectangle and a pixel grid. The rectangle is centered on the origin.
- xmin, xmax, ymin, ymaxfloat
Extent of the grid in the x and y direction.
- nx, nyint
The width of the rectangle
The height of the rectangle
The position angle of the rectangle in radians (counterclockwise).
- use_exact0 or 1
If set to 1, calculates the exact overlap, while if set to 0, uses a subpixel sampling method with
subpixelsubpixels in each direction.
use_exactis 0, each pixel is resampled by this factor in each dimension. Thus, each pixel is divided into
subpixels ** 2subpixels.
2-d array giving the fraction of the overlap.