Geometric (rojak.core.geometric)#

Geometric utilities for spatial gridding, aggregation, and geodesic calculations

This module provides standalone functions for building spatial grids over a domain and aggregating data onto them (create_grid_data_frame(), create_rectangular_spatial_grid_buckets(), create_polygon_spatial_grid_buckets(), spatial_aggregation()), computing waypoints along the great circle between two coordinates and interpolating gridded data along them (geodesic_waypoints_between(), interpolate_to_geodesic_waypoints()), and computing the great-circle distance between two points (haversine_distance()).

Functions

create_grid_data_frame(domain, step_size[, crs])

Build a (dask) GeoDataFrame of grid cells tiling a spatial domain

create_polygon_spatial_grid_buckets(domain, ...)

Tile an arbitrary polygon's bounding box into a regular grid, keeping only cells that intersect it

create_rectangular_spatial_grid_buckets(...)

Tile a rectangular spatial domain into a regular grid of polygons

geodesic_waypoints_between(start, end, grid_size)

Find the coordinates (i.e. waypoints) on the great circle between the two points.

haversine_distance(lon_1, lat_1, lon_2, lat_2, /)

Haversine distance in m between two points as pairs of longitude and latitude

interpolate_to_geodesic_waypoints(start, ...)

Interpolate gridded data onto the geodesic waypoints between two coordinates

spatial_aggregation(grid, data_to_aggregate, ...)

Aggregate data onto a grid, based on a prior spatial join between the data and the grid

Classes

DistanceUnits(*values)

Units for a computed distance