8.9 POLYGONAL DATA
By "polygonal data" we refer to a class of point data set where each point represents a polygonal region rather than a single coordinate. An example of polygonal data would be a value associated with each state in the United States.
8.9.1 Visualization techniques for polygonal data
Visualizations of polygonal data is best handled with the POLYGON command. If the coordinates of the polygon vertices are available in 2-dimensional arrays, XPOLY and YPOLY, in which the axes of the arrays are the polygon vertices and the sequence of polygons the use of the POLYGON command is straightforward. The POLYGON command can also handle sequences of polygons encoded in 1-dimensional arrays with missing values separating each polygon.
Ferret does not have any tools specifically addressing the analysis of polygonal data sets. The analysis of these data sets in Ferret requires the creation of a gridded mask field corresponding to the polygonal regions (an external function could be written that would create a gridded mask of arbitrary resolution from polygonal coordinates.)
Once the mask is created, the standard gridded operators for averaging, integrating, etc. can be used. For example, if variable cal_mask contains a gridded mask of the state of California on latitude and longitude axes of 10 minute resolution then this definition would compute the average of a gridded variable, var, over California:
yes? let cal_var = mask * var[g=mask]
yes? let cal_average = cal_var[x=@ave, y=@ave]