MGH_POLYFILLG
Name
MGH_POLYFILLG
Description
Given a 2-D polygon and a rectangular grid, this function returns
an array indicating the fraction (optionally the area) of each
pixel inside the polygon.
Calling Sequence
result = mgh_polyfillg(poly)
Positional Parameters
poly (input, numeric [2,n] array)
The polygon
Keyword Parameters
XOUT, YOUT (input, 1-D or 2-D numeric arrays)
Vertex positions for the grid.
Return Value
The function returns a 2D array representing the fraction
(optionally the area) of overlap between each pixel and the polygon.
###########################################################################
Copyright (c) 2002-2015 NIWA:
http://www.niwa.co.nz/
Licensed under the MIT open source license:
http://www.opensource.org/licenses/mit-license.php
###########################################################################
Modification History
Mark Hadfield, 2002-08:
Written
Mark Hadfield, 2011-07:
Forced some denominators to (double precision) floating point.
Mark Hadfield, 2015-02:
Updated source code.