Regionalizers
This module contains regionalizers, which are used to divide space before analysis.
Embedding methods available in srai operate on a regions, which can be defined in many ways. In
this module, we aggregate different regionalization methods under a common Regionalizer interface.
We include both pre-defined spatial indexes (e.g. H3 or S2), data-based ones (e.g. Voronoi) and OSM-
based ones (e.g. administrative boundaries).
Classes
- Regionalizer
- AdministrativeBoundaryRegionalizer
- H3Regionalizer
- S2Regionalizer
- SlippyMapRegionalizer
- VoronoiRegionalizer
Functions
geocode_to_region_gdf
Geocode a query to the regions_gdf unified format.
This functions is a wrapper around the ox.geocode_to_gdf[1] function from the osmnx library.
For parameters description look into the source documentation.
| PARAMETER | DESCRIPTION |
|---|---|
query |
Query string(s) or structured dict(s) to geocode.
TYPE:
|
by_osmid |
Flag to treat query as an OSM ID lookup rather than text search. Defaults to False.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
gpd.GeoDataFrame
|
gpd.GeoDataFrame: GeoDataFrame with geocoded regions. |