- scalenav.data.df_project_on_grid(data, res=11)
Project a geopandas.GeoDataFrame containing points on the H3 grid at a given resolution.
- Parameters:
data (a geopandas.GeoDataFrame with a geometry column containing points.)
res (a integer value of H3 resolution.)
- Return type:
The original data frame with a new column called h3_id ccontaining the H3 code for each geometry.
Apply a constraint to a layer. Remove the constrained cells from the layer and renormalise the values.
- Parameters:
layer ([<class 'pandas.core.frame.DataFrame'>, <class 'geopandas.geodataframe.GeoDataFrame'>])
constraint ([<class 'pandas.core.frame.DataFrame'>, <class 'pandas.core.series.Series'>])
Get H3 index of lat,lon coordinates for a resolution. Simple wrapper around the H3.latlng_to_cell function.
- Parameters:
lat (float)
lon (float)
res (int)
- Return type:
DataFrame
DEPRECATED Convert a bunch of raster files given by their file location in a list into a single geospatial file containing the centroids of cells. If the out_path exists, then simply read it. This is kind of deprecated and replaced by the command line tool and higher performance function using pyArrow.
- Parameters:
out_path (str, is a single path to a parquet file.)
in_paths (list(str), is a list of paths to .tiff or .nc files.)
- Return type:
a pandas.DataFrame with columns lon, lat and band.
Allows adding a custom distance value for unusual grid shapes and specify if the raster cells are in projected or arc sizes.
- Parameters:
x (float)
y (float)
ref (str)
dist (float)
Make a square box with side size given in the distance parameter centered on the (lon,lat) point. The distance is expected to be in meters. The coordinates in degrees according to WGS:84.
- Parameters:
lat (float)
lon (float)
distance (int)
ref (str)
- Return type:
Polygon