uxarray.Grid.to_polycollection#
- Grid.to_polycollection(periodic_elements='exclude', projection=None, return_indices=False, cache=True, override=False, return_non_nan_polygon_indices=False, **kwargs)#
Constructs a
matplotlib.collections.PolyCollection`
consisting of polygons representing the faces of the currentGrid
- Parameters:
periodic_elements (str, optional) – Method for handling periodic elements. One of [‘exclude’, ‘split’, or ‘ignore’]: - ‘exclude’: Periodic elements will be identified and excluded from the GeoDataFrame - ‘split’: Periodic elements will be identified and split using the
antimeridian
package - ‘ignore’: No processing will be applied to periodic elements.projection (ccrs.Projection) – Cartopy geographic projection to use
return_indices (bool) – Flag to indicate whether to return the indices of corrected polygons, if any exist
cache (bool) – Flag to indicate whether to cache the computed PolyCollection
override (bool) – Flag to indicate whether to override a cached PolyCollection, if it exists
**kwargs (dict) – Key word arguments to pass into the construction of a PolyCollection