The Apache Sedona community is excited to announce the initial release of SedonaDB! 🎉
SedonaDB is the first open-source, single-node analytical database engine that treats spatial data as a first-class citizen. It is developed as a subproject of Apache Sedona.
Apache Sedona powers large-scale geospatial processing on distributed engines like Spark (SedonaSpark), Flink (SedonaFlink), and Snowflake (SedonaSnow). SedonaDB extends the Sedona ecosystem with a single-node engine optimized for small-to-medium data analytics, delivering the simplicity and speed that distributed systems often cannot.
🤔 What is SedonaDB
Written in Rust, SedonaDB is lightweight, blazing fast, and spatial-native. Out of the box, it provides:
- 🗺️ Full support for spatial types, joins, CRS (coordinate reference systems), and functions on top of industry-standard query operations.
- ⚡ Query optimizations, indexing, and data pruning features under the hood that make spatial operations just work with high performance.
- 🐍 Pythonic and SQL interfaces familiar to developers, plus APIs for R and Rust.
- ☁️ Flexibility to run in single-machine environments on local files or data lakes.
SedonaDB utilizes Apache Arrow and Apache DataFusion, providing everything you need from a modern, vectorized query engine. What sets it apart is the ability to process spatial workloads natively, without extensions or plugins. Installation is straightforward, and SedonaDB integrates easily into both local development and cloud pipelines, offering a consistent experience across environments.
The initial release of SedonaDB provides a comprehensive suite of geometric vector operations and seamlessly integrates with GeoArrow, GeoParquet, and GeoPandas. Future versions will support all popular spatial functions, including functions for raster data.
🚀 SedonaDB quickstart example
Start by installing SedonaDB:
pip install "apache-sedona[db]"
Now instantiate the connection:
import sedona.db
sd = sedona.db.connect()
Let’s perform a spatial join using SedonaDB.
Suppose you have a cities table with latitude and longitude points representing the center of each city, and a countries table with a column containing a polygon of the country’s geographic boundaries.
Here are a few rows from the cities table:
┌──────────────┬───────────────────────────────┐
│ name ┆ geometry │
│ utf8view ┆ geometry │╞══════════════╪═══════════════════════════════╡│┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤4326>
┌─────────────────────────────┬───────────────┬────────────────────────────────────────────────────┐│┆┆││┆┆│╞═════════════════════════════╪═══════════════╪════════════════════════════════════════════════════╡│┆┆…│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆┆…│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆┆…│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤4326>
’
┌───────────────┬─────────────────────────────┬───────────┐│┆┆││┆┆│╞═══════════════╪═════════════════════════════╪═══════════╡│┆┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤│┆┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤│┆┆│└───────────────┴─────────────────────────────┴───────────┘
📊
–
’
┌───────────────┬──────────┬─────────────────────┐│┆┆││┆┆│╞═══════════════╪══════════╪═════════════════════╡│┆┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆┆│├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆┆│└───────────────┴──────────┴─────────────────────┘
’
""""""""""""""""""""""""""""""""""""""
🗺️
’
’’’
’
’’
┌──────────┐││││╞══════════╡││└──────────┘
🎯
’
┌───────────┬───────────────────────────────┬───────────────┬───────────────┬──────────────────────┐│┆┆┆┆││┆┆┆┆│╞═══════════╪═══════════════════════════════╪═══════════════╪═══════════════╪══════════════════════╡│┆…┆┆┆│├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆…┆┆┆│├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤│┆…┆┆┆│└───────────┴───────────────────────────────┴───────────────┴───────────────┴──────────────────────┘


