Generation Functions
Generation functions create distributions of points or cells for spatial analysis.
Points
Fibonacci Lattice
- tatc.generation.generate_fibonacci_lattice_points(distance: float, elevation: float = 0, mask: Optional[Union[Polygon, MultiPolygon]] = None) GeoDataFrame[source]
Generates geodetic points following a Fibonacci lattice.
See: Gonzalez (2010). “Measurement of areas on a sphere using Fibonacci and latitude-longitude lattices”, Mathematical Geosciences 42(49). doi: 10.1007/s11004-009-9257-x
Note: this implementation differs slightly from Gonzalez. Gonzalez requires an odd number of points. This implementation allows any number of points. In agreement with Gonzalez, no points are placed at poles.
- Parameters
distance (float) – The typical surface distance (meters) between points.
elevation (float) – The elevation (meters) above the datum in the WGS 84 coordinate system.
mask (Polygon or MultiPolygon) – An optional mask to constrain points using WGS84 (EPSG:4326) geodetic coordinates in a Polygon or MultiPolygon.
- Returns
the data frame of generated points
- Return type
Cubed Sphere
- tatc.generation.generate_cubed_sphere_points(distance: float, elevation: float = 0, mask: Optional[Union[Polygon, MultiPolygon]] = None) GeoDataFrame[source]
Generates geodetic points at the centroid of regular cubed-sphere grid cells.
See: Putman and Lin (2007). “Finite-volume transport on various cubed-sphere grids”, Journal of Computational Physics, 227(1). doi: 10.1016/j.jcp.2007.07.022
- Parameters
distance (float) – The typical surface distance (meters) between points.
elevation (float) – The elevation (meters) above the datum in the WGS 84 coordinate system.
mask (Polygon or MultiPolygon) – An optional mask to constrain points using WGS84 (EPSG:4326) geodetic coordinates in a Polygon or MultiPolygon.
- Returns
the data frame of generated points
- Return type
Cells
Cubed Sphere
- tatc.generation.generate_cubed_sphere_cells(distance: float, elevation: float = 0, mask: Optional[Union[Polygon, MultiPolygon]] = None, strips: Optional[str] = None) GeoDataFrame[source]
Generates geodetic polygons over a regular cubed-sphere grid.
See: Putman and Lin (2007). “Finite-volume transport on various cubed-sphere grids”, Journal of Computational Physics, 227(1). doi: 10.1016/j.jcp.2007.07.022
- Parameters
distance (float) – The typical surface distance (meters) between points.
elevation (float) – The elevation (meters) above the datum in the WGS 84 coordinate system.
mask (Polygon or MultiPolygon) – An optional mask to constrain cells using WGS84 (EPSG:4326) geodetic coordinates in a Polygon or MultiPolygon.
strips (str) – Option to generate strip-cells along latitude (“lat”), longitude (“lon”), or none (None).
- Returns
the data frame of generated cells
- Return type