kraina-ai/srai
Spatial Representations for Artificial Intelligence - a Python library toolkit for geospatial machine learning focused on creating embeddings for downstream tasks
What it solves
Spatial machine learning projects often struggle with the tedious process of gathering geographic data, splitting regions, and converting spatial features into vector formats that machine learning models can understand. SRAI standardizes this workflow by providing a unified Python library to download spatial data, divide areas into micro-regions, and embed those regions into vector spaces.
How it works
The library uses modular components: loaders fetch geographic information from sources like OpenStreetMap, Overture Maps, or GTFS feeds; regionalizers split areas into micro-regions using tools like Uber's H3, Google's S2, or Voronoi diagrams; joiners link features to regions; and embedders (including count-based approaches and PyTorch models like hex2vec) convert the spatial features into vector embeddings.
Who it’s for
This library is built for data scientists, machine learning engineers, and researchers working on geospatial AI applications who want to streamline data preparation and regional embedding tasks.
Highlights
- Downloads spatial data from OpenStreetMap and Overture Maps using online APIs or PBF files.
- Supports regionalization techniques including Uber H3, Google S2, and Voronoi diagrams.
- Provides various embedding algorithms like Hex2Vec, GTFS2Vec, Highway2Vec, and count-based embedders.
- Includes built-in datasets and benchmark modules for downstream geospatial tasks.
- Offers spatial data visualization and utility functions designed for custom map plotting.
Related
- Project
- Project
- Project
- Project
- Project