pixcdust.dggs.h3_tools¶
Functions¶
|
|
|
|
|
Convert a GeoDataFrame with latitude and longitude columns to a GeoDataFrame |
|
|
|
|
|
Convert a GeoDataFrame with latitude and longitude columns to a GeoDataFrame |
Module Contents¶
- pixcdust.dggs.h3_tools.gdf_to_h3_gdf(gdf: geopandas.GeoDataFrame, resolution: int) geopandas.GeoDataFrame[source]¶
Convert a GeoDataFrame with latitude and longitude columns to a GeoDataFrame where rows are aggregated into H3 hexagons based on a given resolution.
- Args:
gdf (gpd.GeoDataFrame): The input GeoDataFrame containing ‘latitude’ and ‘longitude’ columns. resolution (int): The H3 resolution level for hexagon indexing.
- Returns:
- gpd.GeoDataFrame: A new GeoDataFrame where the rows are grouped by H3 hexagons,
containing the mean of the grouped variables, and a geometry column with polygons representing the H3 hexagons.
- pixcdust.dggs.h3_tools.gdf_to_healpix_gdf(gdf: geopandas.GeoDataFrame, resolution: int) geopandas.GeoDataFrame[source]¶
Convert a GeoDataFrame with latitude and longitude columns to a GeoDataFrame where rows are aggregated into Healpix geometry based on a given resolution.
- Args:
gdf (gpd.GeoDataFrame): The input GeoDataFrame containing ‘latitude’ and ‘longitude’ columns. resolution (int): The Healpix resolution level for indexing.
- Returns:
- gpd.GeoDataFrame: A new GeoDataFrame where the rows are grouped by H3 hexagons,
containing the mean of the grouped variables, and a geometry column with polygons representing the Healpix geometry.