This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/asf-site by this push:
new c498c536 Deployed dea8d62 to latest-snapshot with MkDocs 1.6.1 and
mike 2.1.3
c498c536 is described below
commit c498c536c8dff204953dd5f674d8b9613407f61f
Author: GitHub Actions <[email protected]>
AuthorDate: Tue Feb 10 19:10:42 2026 +0000
Deployed dea8d62 to latest-snapshot with MkDocs 1.6.1 and mike 2.1.3
---
latest-snapshot/postgis.ipynb | 457 +++++++++++++++++++++
.../functions/st_area => postgis}/index.html | 359 +++++++++++++---
.../_matplotlib_defaults.cpython-314.pyc | Bin 431 -> 431 bytes
.../__pycache__/_render_meta.cpython-314.pyc | Bin 8436 -> 8436 bytes
latest-snapshot/reference/functions/index.html | 2 +-
.../reference/functions/st_analyze_agg/index.html | 2 +-
.../reference/functions/st_area/index.html | 2 +-
.../reference/functions/st_asbinary/index.html | 2 +-
.../reference/functions/st_buffer/index.html | 2 +-
.../reference/functions/st_intersection/index.html | 2 +-
latest-snapshot/search/search_index.json | 2 +-
latest-snapshot/sitemap.xml | 4 +
latest-snapshot/sitemap.xml.gz | Bin 385 -> 390 bytes
13 files changed, 767 insertions(+), 67 deletions(-)
diff --git a/latest-snapshot/postgis.ipynb b/latest-snapshot/postgis.ipynb
new file mode 100644
index 00000000..db46117d
--- /dev/null
+++ b/latest-snapshot/postgis.ipynb
@@ -0,0 +1,457 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "c16fb8f6",
+ "metadata": {},
+ "source": [
+ "<!--\n",
+ "Licensed to the Apache Software Foundation (ASF) under one\n",
+ "or more contributor license agreements. See the NOTICE file\n",
+ "distributed with this work for additional information\n",
+ "regarding copyright ownership. The ASF licenses this file\n",
+ "to you under the Apache License, Version 2.0 (the\n",
+ "\"License\"); you may not use this file except in compliance\n",
+ "with the License. You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing,\n",
+ "software distributed under the License is distributed on an\n",
+ "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n",
+ "KIND, either express or implied. See the License for the\n",
+ "specific language governing permissions and limitations\n",
+ "under the License.\n",
+ "-->\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "400dc2d5-ad77-48d5-9cb4-2078558b0887",
+ "metadata": {},
+ "source": [
+ "# SedonaDB + PostGIS\n",
+ "\n",
+ "This page demonstrates how to integrate PostGIS with SedonaDB.\n",
+ "\n",
+ "Two approaches are covered:\n",
+ "\n",
+ "1. A GeoPandas-based workflow for simplicity and exploratory use.\n",
+ "2. A high-performance ADBC-based workflow for large datasets and
production use cases.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b65ce9cd-63fc-4951-a2b7-84c7f0c2f97a",
+ "metadata": {},
+ "source": [
+ "## Prerequisites\n",
+ "\n",
+ "This notebook assumes:\n",
+ "\n",
+ "- A running PostgreSQL instance with PostGIS enabled\n",
+ "- Python 3.9+\n",
+ "- The following Python packages available:\n",
+ " - `geopandas`\n",
+ " - `sqlalchemy`\n",
+ " - `geoalchemy2`\n",
+ " - `psycopg2-binary`\n",
+ " - `adbc-driver-postgresql`\n",
+ "\n",
+ "### Optional: Installing dependencies in a Jupyter environment\n",
+ "\n",
+ "If you are running this notebook interactively, you can install the
required\n",
+ "dependencies using:\n",
+ "\n",
+ "```bash\n",
+ "pip install geopandas sqlalchemy geoalchemy2 psycopg2-binary
adbc-driver-postgresql\n",
+ "```\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4d59eab9-9dc5-479e-ac27-b614140a776c",
+ "metadata": {},
+ "source": [
+ "## PostGIS Setup\n",
+ "\n",
+ "This tutorial assumes a running PostgreSQL instance with PostGIS
enabled.\n",
+ "\n",
+ "For development and testing, the SedonaDB repository provides a
PostGIS\n",
+ "Docker container that can be started with:\n",
+ "\n",
+ "```bash\n",
+ "docker compose up postgis --detach\n",
+ "```"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "3deb4979",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style scoped>\n",
+ " .dataframe tbody tr th:only-of-type {\n",
+ " vertical-align: middle;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>name</th>\n",
+ " <th>geometry</th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>0</th>\n",
+ " <td>New York</td>\n",
+ " <td>POINT (-74.006 40.7128)</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>1</th>\n",
+ " <td>Los Angeles</td>\n",
+ " <td>POINT (-118.2437 34.0522)</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>2</th>\n",
+ " <td>Chicago</td>\n",
+ " <td>POINT (-87.6298 41.8781)</td>\n",
+ " </tr>\n",
+ " </tbody>\n",
+ "</table>\n",
+ "</div>"
+ ],
+ "text/plain": [
+ " name geometry\n",
+ "0 New York POINT (-74.006 40.7128)\n",
+ "1 Los Angeles POINT (-118.2437 34.0522)\n",
+ "2 Chicago POINT (-87.6298 41.8781)"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import geopandas as gpd\n",
+ "from shapely.geometry import Point\n",
+ "from sqlalchemy import create_engine\n",
+ "\n",
+ "gdf = gpd.GeoDataFrame(\n",
+ " {\n",
+ " \"name\": [\"New York\", \"Los Angeles\", \"Chicago\"],\n",
+ " \"geometry\": [\n",
+ " Point(-74.006, 40.7128),\n",
+ " Point(-118.2437, 34.0522),\n",
+ " Point(-87.6298, 41.8781),\n",
+ " ],\n",
+ " },\n",
+ " crs=\"EPSG:4326\",\n",
+ ")\n",
+ "\n",
+ "gdf"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ba7395d0",
+ "metadata": {},
+ "source": [
+ "We'll use `create_engine()` to access PostGIS via SQLAlchemy."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "2c154d29",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "engine =
create_engine(\"postgresql+psycopg2://postgres:[email protected]:5432\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c85c9069",
+ "metadata": {},
+ "source": [
+ "## PostGIS → SedonaDB using GeoPandas\n",
+ "\n",
+ "This approach reads a PostGIS table into a GeoPandas DataFrame and then
converts it into a SedonaDB DataFrame.\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "7465a36e-7308-4e0c-94f9-c17691ddd0c4",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import geopandas as gpd\n",
+ "import sedona.db"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "3398cb96",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "gdf.to_postgis(\n",
+ " \"my_places\",\n",
+ " engine,\n",
+ " if_exists=\"replace\",\n",
+ " index=False,\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "b2c8480d",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "┌─────────────┬──────────────────────────┐\n",
+ "│ name ┆ geometry │\n",
+ "│ utf8 ┆ geometry │\n",
+ "╞═════════════╪══════════════════════════╡\n",
+ "│ New York ┆ POINT(-74.006 40.7128) │\n",
+ "├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ Los Angeles ┆ POINT(-118.2437 34.0522) │\n",
+ "├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ Chicago ┆ POINT(-87.6298 41.8781) │\n",
+ "└─────────────┴──────────────────────────┘\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "SedonaSchema with 2 fields:\n",
+ " name: utf8<LargeUtf8>\n",
+ " geometry: geometry<Wkb(epsg:4326)>"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "gdf = gpd.read_postgis(\n",
+ " \"SELECT * FROM my_places\",\n",
+ " engine,\n",
+ " geom_col=\"geometry\",\n",
+ ")\n",
+ "\n",
+ "\n",
+ "sd = sedona.db.connect()\n",
+ "df = sd.create_data_frame(gdf)\n",
+ "df.show()\n",
+ "df.schema"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "e275539e-4c1b-4c47-9c8c-c8be5ab437d8",
+ "metadata": {},
+ "source": [
+ "## High-performance PostGIS integration using ADBC\n",
+ "\n",
+ "Apache Arrow Database Connectivity (ADBC) enables efficient, zero-copy
data transfer between databases and analytical engines. This approach is
especially useful when working with large tables or when minimizing memory
overhead is important.\n",
+ "\n",
+ "By using `adbc_ingest()` and `fetch_arrow()`, this approach avoids
row-wise iteration and intermediate Pandas DataFrames, making it well suited
for large datasets and performance-critical pipelines.\n",
+ "\n",
+ "First, we'll open the connection using ADBC:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "5eeb27b9-8f17-4f09-9978-4550051ea9ff",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import adbc_driver_postgresql.dbapi\n",
+ "\n",
+ "conn = adbc_driver_postgresql.dbapi.connect(\n",
+ " \"postgresql://postgres:[email protected]:5432/postgres\"\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "44d46e84-1bee-4aff-bc36-b5208b9fd3e0",
+ "metadata": {},
+ "source": [
+ "To write the data from SedonaDB, we'll first ingest the table as a
temporary table with geometry columns as WKB. This approach leverages ADBC's
optimized Postgres ingest path."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "aa071023-68cc-4c12-9d95-ad901d9b01e0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "with conn.cursor() as cur:\n",
+ " url =
\"https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point_geo.parquet\"\n",
+ "\n",
+ " sd.read_parquet(url).to_view(\"ns_water_point\", overwrite=True)\n",
+ "\n",
+ " df = sd.sql(\"\"\"\n",
+ " SELECT \"OBJECTID\", ST_AsBinary(geometry) AS geometry\n",
+ " FROM ns_water_point\n",
+ " \"\"\")\n",
+ "\n",
+ " cur.adbc_ingest(\"ns_water_point_temp\", df, temporary=True)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "900d0859",
+ "metadata": {},
+ "source": [
+ "Next, we'll create the table using a SELECT query that populates the
geometry column."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "fce1619b-2377-4bdf-9323-338adc55c78c",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "with conn.cursor() as cur:\n",
+ " cur.executescript(\"\"\"\n",
+ " CREATE TABLE ns_water_point AS\n",
+ " SELECT\n",
+ " \"OBJECTID\",\n",
+ " ST_GeomFromWKB(geometry) AS geometry\n",
+ " FROM ns_water_point_temp\n",
+ " \"\"\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4d2faea8-0332-4d76-ac30-bee3fb22fed9",
+ "metadata": {},
+ "source": [
+ "To read data, we'll use the features of `create_data_frame()` that allows
us to ingest any Arrow reader as a SedonaDB data frame. Next, we'll collect it
while the cursor is still open using `to_memtable()`."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "id": "d963ba48-ad17-4c05-af24-c4c4189228e2",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "with conn.cursor() as cur:\n",
+ " cur.execute(\"\"\"\n",
+ " SELECT \"OBJECTID\", ST_AsBinary(geometry) AS geom_wkb\n",
+ " FROM ns_water_point\n",
+ " \"\"\")\n",
+ "\n",
+ " sd.create_data_frame(cur.fetch_arrow()).to_view(\"postgis_result\",
overwrite=True)\n",
+ "\n",
+ " df = sd.sql(\"\"\"\n",
+ " SELECT \"OBJECTID\", ST_GeomFromWKB(geom_wkb) AS geometry\n",
+ " FROM postgis_result\n",
+ " \"\"\").to_memtable()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4736062e",
+ "metadata": {},
+ "source": [
+ "After the dataframwe has been collected, we can interact with it even
after the cursor has been closed."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "id": "0054c221-c7d3-45d2-b2a5-cf296ea1fa73",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+
"┌──────────┬──────────────────────────────────────────────────────────────────┐\n",
+ "│ OBJECTID ┆ geometry
│\n",
+ "│ int64 ┆ geometry
│\n",
+
"╞══════════╪══════════════════════════════════════════════════════════════════╡\n",
+ "│ 1055 ┆ POINT Z(258976.3273 4820275.6807 -0.5)
│\n",
+
"├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ 1023 ┆ POINT Z(258340.72730000038 4819923.080700001
0.6000000000058208) │\n",
+
"├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ 1021 ┆ POINT Z(258338.4263000004 4819908.080700001 0.5)
│\n",
+
"├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ 985 ┆ POINT Z(258526.62729999982 4819583.580700001 0)
│\n",
+
"├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ 994 ┆ POINT Z(258498.92729999963 4819652.080700001
1.8999999999941792) │\n",
+
"└──────────┴──────────────────────────────────────────────────────────────────┘\n"
+ ]
+ }
+ ],
+ "source": [
+ "df.head(5).show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1658368c-94a5-448b-b4a7-0271a95ffb16",
+ "metadata": {},
+ "source": [
+ "### Choosing an approach\n",
+ "\n",
+ "- Use the GeoPandas-based approach for simplicity and exploratory
workflows.\n",
+ "- Use the ADBC-based approach for large datasets or production
pipelines\n",
+ " where performance and memory efficiency are critical.\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": ".venv",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.13.8"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/latest-snapshot/reference/functions/st_area/index.html
b/latest-snapshot/postgis/index.html
similarity index 61%
copy from latest-snapshot/reference/functions/st_area/index.html
copy to latest-snapshot/postgis/index.html
index 38a848fb..69e38143 100644
--- a/latest-snapshot/reference/functions/st_area/index.html
+++ b/latest-snapshot/postgis/index.html
@@ -7,7 +7,7 @@
- <link rel="canonical"
href="https://sedona.apache.org/sedonadb/latest/reference/functions/st_area/">
+ <link rel="canonical"
href="https://sedona.apache.org/sedonadb/latest/postgis/">
@@ -15,19 +15,19 @@
- <link rel="icon" href="../../../image/sedona_logo_symbol.png">
+ <link rel="icon" href="../image/sedona_logo_symbol.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.1">
- <title>ST_Area - Apache Sedona</title>
+ <title>Postgis - Apache Sedona</title>
- <link rel="stylesheet"
href="../../../assets/stylesheets/main.484c7ddc.min.css">
+ <link rel="stylesheet"
href="../assets/stylesheets/main.484c7ddc.min.css">
- <link rel="stylesheet"
href="../../../assets/stylesheets/palette.ab4e12ef.min.css">
+ <link rel="stylesheet"
href="../assets/stylesheets/palette.ab4e12ef.min.css">
@@ -46,17 +46,17 @@
- <link rel="stylesheet" href="../../../assets/_mkdocstrings.css">
+ <link rel="stylesheet" href="../assets/_mkdocstrings.css">
- <link rel="stylesheet" href="../../../stylesheets/extra.css">
+ <link rel="stylesheet" href="../stylesheets/extra.css">
- <script>__md_scope=new
URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
+ <script>__md_scope=new
URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
- <link href="../../../assets/stylesheets/glightbox.min.css"
rel="stylesheet"><script
src="../../../assets/javascripts/glightbox.min.js"></script><style
id="glightbox-style">
+ <link href="../assets/stylesheets/glightbox.min.css"
rel="stylesheet"><script
src="../assets/javascripts/glightbox.min.js"></script><style
id="glightbox-style">
html.glightbox-open { overflow: initial; height: 100%; }
.gslide-title { margin-top: 0px; user-select: text; }
.gslide-desc { color: #666; user-select: text; }
@@ -84,7 +84,7 @@
<div data-md-component="skip">
- <a href="#st_area" class="md-skip">
+ <a href="#sedonadb-postgis" class="md-skip">
Skip to content
</a>
@@ -140,9 +140,9 @@
</label>
<!-- Link to home -->
- <a href="../../.." title="Apache Sedona" class="header-logo"
aria-label="Apache Sedona" data-md-component="logo">
+ <a href=".." title="Apache Sedona" class="header-logo"
aria-label="Apache Sedona" data-md-component="logo">
- <img src="../../../image/logo.svg" alt="logo">
+ <img src="../image/logo.svg" alt="logo">
</a>
@@ -157,7 +157,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
- ST_Area
+ Postgis
</span>
</div>
@@ -283,7 +283,7 @@
<li class="md-tabs__item">
- <a href="../../.." class="md-tabs__link">
+ <a href=".." class="md-tabs__link">
@@ -519,8 +519,8 @@
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation"
data-md-level="0">
<label class="md-nav__title" for="__drawer">
- <a href="../../.." title="Apache Sedona" class="logo-link"
aria-label="Apache Sedona" data-md-component="logo">
- <img src="../../../image/header/logo-mobile.svg" alt="" class="logo">
+ <a href=".." title="Apache Sedona" class="logo-link" aria-label="Apache
Sedona" data-md-component="logo">
+ <img src="../image/header/logo-mobile.svg" alt="" class="logo">
</a>
</label>
@@ -626,7 +626,7 @@
<li class="md-nav__item">
- <a href="../../.." class="md-nav__link">
+ <a href=".." class="md-nav__link">
@@ -654,7 +654,7 @@
<li class="md-nav__item">
- <a href="../../../quickstart-python/" class="md-nav__link">
+ <a href="../quickstart-python/" class="md-nav__link">
@@ -682,7 +682,7 @@
<li class="md-nav__item">
- <a href="../../../programming-guide/" class="md-nav__link">
+ <a href="../programming-guide/" class="md-nav__link">
@@ -762,7 +762,7 @@
<li class="md-nav__item">
- <a href="../../python/" class="md-nav__link">
+ <a href="../reference/python/" class="md-nav__link">
@@ -790,7 +790,7 @@
<li class="md-nav__item">
- <a href="../../sql/" class="md-nav__link">
+ <a href="../reference/sql/" class="md-nav__link">
@@ -818,7 +818,7 @@
<li class="md-nav__item">
- <a href="../../sql-joins/" class="md-nav__link">
+ <a href="../reference/sql-joins/" class="md-nav__link">
@@ -906,7 +906,7 @@
<li class="md-nav__item">
- <a href="../../../geopandas-interop/" class="md-nav__link">
+ <a href="../geopandas-interop/" class="md-nav__link">
@@ -934,7 +934,7 @@
<li class="md-nav__item">
- <a href="../../../overture-examples/" class="md-nav__link">
+ <a href="../overture-examples/" class="md-nav__link">
@@ -962,7 +962,7 @@
<li class="md-nav__item">
- <a href="../../../crs-examples/" class="md-nav__link">
+ <a href="../crs-examples/" class="md-nav__link">
@@ -990,7 +990,7 @@
<li class="md-nav__item">
- <a href="../../../delta-lake/" class="md-nav__link">
+ <a href="../delta-lake/" class="md-nav__link">
@@ -1018,7 +1018,7 @@
<li class="md-nav__item">
- <a href="../../../iceberg/" class="md-nav__link">
+ <a href="../iceberg/" class="md-nav__link">
@@ -1046,7 +1046,7 @@
<li class="md-nav__item">
- <a href="../../../working-with-parquet-files/" class="md-nav__link">
+ <a href="../working-with-parquet-files/" class="md-nav__link">
@@ -1074,7 +1074,7 @@
<li class="md-nav__item">
- <a href="../../../working-with-sql-sedonadb/" class="md-nav__link">
+ <a href="../working-with-sql-sedonadb/" class="md-nav__link">
@@ -1110,7 +1110,7 @@
<li class="md-nav__item">
- <a href="../../../contributors-guide/" class="md-nav__link">
+ <a href="../contributors-guide/" class="md-nav__link">
@@ -1361,21 +1361,38 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
- <a href="#usage" class="md-nav__link">
+ <a href="#prerequisites" class="md-nav__link">
<span class="md-ellipsis">
- Usage
+ Prerequisites
+
+ </span>
+ </a>
+
+ <nav class="md-nav" aria-label="Prerequisites">
+ <ul class="md-nav__list">
+
+ <li class="md-nav__item">
+ <a href="#optional-installing-dependencies-in-a-jupyter-environment"
class="md-nav__link">
+ <span class="md-ellipsis">
+
+ Optional: Installing dependencies in a Jupyter environment
</span>
</a>
+</li>
+
+ </ul>
+ </nav>
+
</li>
<li class="md-nav__item">
- <a href="#arguments" class="md-nav__link">
+ <a href="#postgis-setup" class="md-nav__link">
<span class="md-ellipsis">
- Arguments
+ PostGIS Setup
</span>
</a>
@@ -1383,10 +1400,10 @@
</li>
<li class="md-nav__item">
- <a href="#description" class="md-nav__link">
+ <a href="#postgis-sedonadb-using-geopandas" class="md-nav__link">
<span class="md-ellipsis">
- Description
+ PostGIS → SedonaDB using GeoPandas
</span>
</a>
@@ -1394,14 +1411,31 @@
</li>
<li class="md-nav__item">
- <a href="#examples" class="md-nav__link">
+ <a href="#high-performance-postgis-integration-using-adbc"
class="md-nav__link">
+ <span class="md-ellipsis">
+
+ High-performance PostGIS integration using ADBC
+
+ </span>
+ </a>
+
+ <nav class="md-nav" aria-label="High-performance PostGIS integration using
ADBC">
+ <ul class="md-nav__list">
+
+ <li class="md-nav__item">
+ <a href="#choosing-an-approach" class="md-nav__link">
<span class="md-ellipsis">
- Examples
+ Choosing an approach
</span>
</a>
+</li>
+
+ </ul>
+ </nav>
+
</li>
</ul>
@@ -1421,7 +1455,7 @@
- <a
href="https://github.com/apache/sedona-db/blob/main/docs/reference/functions/st_area.md"
title="Edit this page" class="md-content__button md-icon" rel="edit">
+ <a href="https://github.com/apache/sedona-db/blob/main/docs/postgis.md"
title="Edit this page" class="md-content__button md-icon" rel="edit">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10
20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0
.3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1
23H12v-2.1l6.1-6.1z"></path></svg>
</a>
@@ -1429,27 +1463,232 @@
-<h1 id="st_area">ST_Area<a class="headerlink" href="#st_area" title="Permanent
link">¶</a></h1>
-<p>Returns the area of a geometry.</p>
-<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent
link">¶</a></h2>
-<div class="highlight"><pre><span></span><code><span
class="n">geometry</span><span class="w"> </span><span
class="n">ST_Area</span><span class="p">(</span><span
class="n">geom</span><span class="p">:</span><span class="w"> </span><span
class="n">geometry</span><span class="p">)</span>
-</code></pre></div>
-<h2 id="arguments">Arguments<a class="headerlink" href="#arguments"
title="Permanent link">¶</a></h2>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+--><h1 id="sedonadb-postgis">SedonaDB + PostGIS<a class="headerlink"
href="#sedonadb-postgis" title="Permanent link">¶</a></h1>
+<p>This page demonstrates how to integrate PostGIS with SedonaDB.</p>
+<p>Two approaches are covered:</p>
+<ol>
+<li>A GeoPandas-based workflow for simplicity and exploratory use.</li>
+<li>A high-performance ADBC-based workflow for large datasets and production
use cases.</li>
+</ol>
+<h2 id="prerequisites">Prerequisites<a class="headerlink"
href="#prerequisites" title="Permanent link">¶</a></h2>
+<p>This notebook assumes:</p>
<ul>
-<li><strong>geom</strong> (geometry): Input geometry</li>
+<li>A running PostgreSQL instance with PostGIS enabled</li>
+<li>Python 3.9+</li>
+<li>The following Python packages available:</li>
+<li><code>geopandas</code></li>
+<li><code>sqlalchemy</code></li>
+<li><code>geoalchemy2</code></li>
+<li><code>psycopg2-binary</code></li>
+<li><code>adbc-driver-postgresql</code></li>
</ul>
-<h2 id="description">Description<a class="headerlink" href="#description"
title="Permanent link">¶</a></h2>
-<p><code>ST_Area()</code> Returns the area of a polygon or multi-polygon
geometry.</p>
-<h2 id="examples">Examples<a class="headerlink" href="#examples"
title="Permanent link">¶</a></h2>
-<div class="highlight"><pre><span></span><code><span
class="k">SELECT</span><span class="w"> </span><span
class="n">ST_Area</span><span class="p">(</span><span
class="n">ST_GeomFromWKT</span><span class="p">(</span><span
class="s1">'POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))'</span><span
class="p">));</span>
+<h3 id="optional-installing-dependencies-in-a-jupyter-environment">Optional:
Installing dependencies in a Jupyter environment<a class="headerlink"
href="#optional-installing-dependencies-in-a-jupyter-environment"
title="Permanent link">¶</a></h3>
+<p>If you are running this notebook interactively, you can install the required
+dependencies using:</p>
+<div class="highlight"><pre><span></span><code>pip<span class="w">
</span>install<span class="w"> </span>geopandas<span class="w">
</span>sqlalchemy<span class="w"> </span>geoalchemy2<span class="w">
</span>psycopg2-binary<span class="w"> </span>adbc-driver-postgresql
+</code></pre></div>
+<h2 id="postgis-setup">PostGIS Setup<a class="headerlink"
href="#postgis-setup" title="Permanent link">¶</a></h2>
+<p>This tutorial assumes a running PostgreSQL instance with PostGIS
enabled.</p>
+<p>For development and testing, the SedonaDB repository provides a PostGIS
+Docker container that can be started with:</p>
+<div class="highlight"><pre><span></span><code>docker<span class="w">
</span>compose<span class="w"> </span>up<span class="w"> </span>postgis<span
class="w"> </span>--detach
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span
class="kn">import</span><span class="w"> </span><span
class="nn">geopandas</span><span class="w"> </span><span
class="k">as</span><span class="w"> </span><span class="nn">gpd</span>
+<span class="kn">from</span><span class="w"> </span><span
class="nn">shapely.geometry</span><span class="w"> </span><span
class="kn">import</span> <span class="n">Point</span>
+<span class="kn">from</span><span class="w"> </span><span
class="nn">sqlalchemy</span><span class="w"> </span><span
class="kn">import</span> <span class="n">create_engine</span>
+
+<span class="n">gdf</span> <span class="o">=</span> <span
class="n">gpd</span><span class="o">.</span><span
class="n">GeoDataFrame</span><span class="p">(</span>
+ <span class="p">{</span>
+ <span class="s2">"name"</span><span class="p">:</span> <span
class="p">[</span><span class="s2">"New York"</span><span class="p">,</span>
<span class="s2">"Los Angeles"</span><span class="p">,</span> <span
class="s2">"Chicago"</span><span class="p">],</span>
+ <span class="s2">"geometry"</span><span class="p">:</span> <span
class="p">[</span>
+ <span class="n">Point</span><span class="p">(</span><span
class="o">-</span><span class="mf">74.006</span><span class="p">,</span> <span
class="mf">40.7128</span><span class="p">),</span>
+ <span class="n">Point</span><span class="p">(</span><span
class="o">-</span><span class="mf">118.2437</span><span class="p">,</span>
<span class="mf">34.0522</span><span class="p">),</span>
+ <span class="n">Point</span><span class="p">(</span><span
class="o">-</span><span class="mf">87.6298</span><span class="p">,</span> <span
class="mf">41.8781</span><span class="p">),</span>
+ <span class="p">],</span>
+ <span class="p">},</span>
+ <span class="n">crs</span><span class="o">=</span><span
class="s2">"EPSG:4326"</span><span class="p">,</span>
+<span class="p">)</span>
+
+<span class="n">gdf</span>
+</code></pre></div>
+<div>
+<style scoped>
+ .dataframe tbody tr th:only-of-type {
+ vertical-align: middle;
+ }
+
+ .dataframe tbody tr th {
+ vertical-align: top;
+ }
+
+ .dataframe thead th {
+ text-align: right;
+ }
+</style>
+<table border="1" class="dataframe">
+ <thead>
+ <tr style="text-align: right;">
+ <th></th>
+ <th>name</th>
+ <th>geometry</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>0</th>
+ <td>New York</td>
+ <td>POINT (-74.006 40.7128)</td>
+ </tr>
+ <tr>
+ <th>1</th>
+ <td>Los Angeles</td>
+ <td>POINT (-118.2437 34.0522)</td>
+ </tr>
+ <tr>
+ <th>2</th>
+ <td>Chicago</td>
+ <td>POINT (-87.6298 41.8781)</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>We'll use <code>create_engine()</code> to access PostGIS via SQLAlchemy.</p>
+<div class="highlight"><pre><span></span><code><span class="n">engine</span>
<span class="o">=</span> <span class="n">create_engine</span><span
class="p">(</span><span
class="s2">"postgresql+psycopg2://postgres:[email protected]:5432"</span><span
class="p">)</span>
+</code></pre></div>
+<h2 id="postgis-sedonadb-using-geopandas">PostGIS → SedonaDB using GeoPandas<a
class="headerlink" href="#postgis-sedonadb-using-geopandas" title="Permanent
link">¶</a></h2>
+<p>This approach reads a PostGIS table into a GeoPandas DataFrame and then
converts it into a SedonaDB DataFrame.</p>
+<div class="highlight"><pre><span></span><code><span
class="kn">import</span><span class="w"> </span><span
class="nn">geopandas</span><span class="w"> </span><span
class="k">as</span><span class="w"> </span><span class="nn">gpd</span>
+<span class="kn">import</span><span class="w"> </span><span
class="nn">sedona.db</span>
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span class="n">gdf</span><span
class="o">.</span><span class="n">to_postgis</span><span class="p">(</span>
+ <span class="s2">"my_places"</span><span class="p">,</span>
+ <span class="n">engine</span><span class="p">,</span>
+ <span class="n">if_exists</span><span class="o">=</span><span
class="s2">"replace"</span><span class="p">,</span>
+ <span class="n">index</span><span class="o">=</span><span
class="kc">False</span><span class="p">,</span>
+<span class="p">)</span>
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span class="n">gdf</span>
<span class="o">=</span> <span class="n">gpd</span><span
class="o">.</span><span class="n">read_postgis</span><span class="p">(</span>
+ <span class="s2">"SELECT * FROM my_places"</span><span class="p">,</span>
+ <span class="n">engine</span><span class="p">,</span>
+ <span class="n">geom_col</span><span class="o">=</span><span
class="s2">"geometry"</span><span class="p">,</span>
+<span class="p">)</span>
+
+
+<span class="n">sd</span> <span class="o">=</span> <span
class="n">sedona</span><span class="o">.</span><span class="n">db</span><span
class="o">.</span><span class="n">connect</span><span class="p">()</span>
+<span class="n">df</span> <span class="o">=</span> <span
class="n">sd</span><span class="o">.</span><span
class="n">create_data_frame</span><span class="p">(</span><span
class="n">gdf</span><span class="p">)</span>
+<span class="n">df</span><span class="o">.</span><span
class="n">show</span><span class="p">()</span>
+<span class="n">df</span><span class="o">.</span><span class="n">schema</span>
+</code></pre></div>
+<div
class="codehilite"><pre><span></span><code>┌─────────────┬──────────────────────────┐
+│ name ┆ geometry │
+│ utf8 ┆ geometry │
+╞═════════════╪══════════════════════════╡
+│ New York ┆ POINT(-74.006 40.7128) │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ Los Angeles ┆ POINT(-118.2437 34.0522) │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ Chicago ┆ POINT(-87.6298 41.8781) │
+└─────────────┴──────────────────────────┘
+
+
+
+
+
+SedonaSchema with 2 fields:
+ name: utf8<LargeUtf8>
+ geometry: geometry<Wkb(epsg:4326)>
</code></pre></div>
-<div
class="codehilite"><pre><span></span><code>┌──────────────────────────────────────────────────────────────────────────┐
-│ st_area(st_geomfromwkt(Utf8("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"))) │
-│ float64 │
-╞══════════════════════════════════════════════════════════════════════════╡
-│ 100.0 │
-└──────────────────────────────────────────────────────────────────────────┘
+
+<h2 id="high-performance-postgis-integration-using-adbc">High-performance
PostGIS integration using ADBC<a class="headerlink"
href="#high-performance-postgis-integration-using-adbc" title="Permanent
link">¶</a></h2>
+<p>Apache Arrow Database Connectivity (ADBC) enables efficient, zero-copy data
transfer between databases and analytical engines. This approach is especially
useful when working with large tables or when minimizing memory overhead is
important.</p>
+<p>By using <code>adbc_ingest()</code> and <code>fetch_arrow()</code>, this
approach avoids row-wise iteration and intermediate Pandas DataFrames, making
it well suited for large datasets and performance-critical pipelines.</p>
+<p>First, we'll open the connection using ADBC:</p>
+<div class="highlight"><pre><span></span><code><span
class="kn">import</span><span class="w"> </span><span
class="nn">adbc_driver_postgresql.dbapi</span>
+
+<span class="n">conn</span> <span class="o">=</span> <span
class="n">adbc_driver_postgresql</span><span class="o">.</span><span
class="n">dbapi</span><span class="o">.</span><span
class="n">connect</span><span class="p">(</span>
+ <span
class="s2">"postgresql://postgres:[email protected]:5432/postgres"</span>
+<span class="p">)</span>
+</code></pre></div>
+<p>To write the data from SedonaDB, we'll first ingest the table as a
temporary table with geometry columns as WKB. This approach leverages ADBC's
optimized Postgres ingest path.</p>
+<div class="highlight"><pre><span></span><code><span class="k">with</span>
<span class="n">conn</span><span class="o">.</span><span
class="n">cursor</span><span class="p">()</span> <span class="k">as</span>
<span class="n">cur</span><span class="p">:</span>
+ <span class="n">url</span> <span class="o">=</span> <span
class="s2">"https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/ns-water_water-point_geo.parquet"</span>
+
+ <span class="n">sd</span><span class="o">.</span><span
class="n">read_parquet</span><span class="p">(</span><span
class="n">url</span><span class="p">)</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"ns_water_point"</span><span class="p">,</span> <span
class="n">overwrite</span><span class="o">=</span><span
class="kc">True</span><span class="p">)</span>
+
+ <span class="n">df</span> <span class="o">=</span> <span
class="n">sd</span><span class="o">.</span><span class="n">sql</span><span
class="p">(</span><span class="s2">"""</span>
+<span class="s2"> SELECT "OBJECTID", ST_AsBinary(geometry) AS
geometry</span>
+<span class="s2"> FROM ns_water_point</span>
+<span class="s2"> """</span><span class="p">)</span>
+
+ <span class="n">cur</span><span class="o">.</span><span
class="n">adbc_ingest</span><span class="p">(</span><span
class="s2">"ns_water_point_temp"</span><span class="p">,</span> <span
class="n">df</span><span class="p">,</span> <span
class="n">temporary</span><span class="o">=</span><span
class="kc">True</span><span class="p">)</span>
+</code></pre></div>
+<p>Next, we'll create the table using a SELECT query that populates the
geometry column.</p>
+<div class="highlight"><pre><span></span><code><span class="k">with</span>
<span class="n">conn</span><span class="o">.</span><span
class="n">cursor</span><span class="p">()</span> <span class="k">as</span>
<span class="n">cur</span><span class="p">:</span>
+ <span class="n">cur</span><span class="o">.</span><span
class="n">executescript</span><span class="p">(</span><span
class="s2">"""</span>
+<span class="s2"> CREATE TABLE ns_water_point AS</span>
+<span class="s2"> SELECT</span>
+<span class="s2"> "OBJECTID",</span>
+<span class="s2"> ST_GeomFromWKB(geometry) AS geometry</span>
+<span class="s2"> FROM ns_water_point_temp</span>
+<span class="s2"> """</span><span class="p">)</span>
</code></pre></div>
+<p>To read data, we'll use the features of <code>create_data_frame()</code>
that allows us to ingest any Arrow reader as a SedonaDB data frame. Next, we'll
collect it while the cursor is still open using <code>to_memtable()</code>.</p>
+<div class="highlight"><pre><span></span><code><span class="k">with</span>
<span class="n">conn</span><span class="o">.</span><span
class="n">cursor</span><span class="p">()</span> <span class="k">as</span>
<span class="n">cur</span><span class="p">:</span>
+ <span class="n">cur</span><span class="o">.</span><span
class="n">execute</span><span class="p">(</span><span class="s2">"""</span>
+<span class="s2"> SELECT "OBJECTID", ST_AsBinary(geometry) AS
geom_wkb</span>
+<span class="s2"> FROM ns_water_point</span>
+<span class="s2"> """</span><span class="p">)</span>
+
+ <span class="n">sd</span><span class="o">.</span><span
class="n">create_data_frame</span><span class="p">(</span><span
class="n">cur</span><span class="o">.</span><span
class="n">fetch_arrow</span><span class="p">())</span><span
class="o">.</span><span class="n">to_view</span><span class="p">(</span><span
class="s2">"postgis_result"</span><span class="p">,</span> <span
class="n">overwrite</span><span class="o">=</span><span
class="kc">True</span><span class="p">)</span>
+
+ <span class="n">df</span> <span class="o">=</span> <span
class="n">sd</span><span class="o">.</span><span class="n">sql</span><span
class="p">(</span><span class="s2">"""</span>
+<span class="s2"> SELECT "OBJECTID", ST_GeomFromWKB(geom_wkb) AS
geometry</span>
+<span class="s2"> FROM postgis_result</span>
+<span class="s2"> """</span><span class="p">)</span><span
class="o">.</span><span class="n">to_memtable</span><span class="p">()</span>
+</code></pre></div>
+<p>After the dataframwe has been collected, we can interact with it even after
the cursor has been closed.</p>
+<div class="highlight"><pre><span></span><code><span class="n">df</span><span
class="o">.</span><span class="n">head</span><span class="p">(</span><span
class="mi">5</span><span class="p">)</span><span class="o">.</span><span
class="n">show</span><span class="p">()</span>
+</code></pre></div>
+<div
class="codehilite"><pre><span></span><code>┌──────────┬──────────────────────────────────────────────────────────────────┐
+│ OBJECTID ┆ geometry │
+│ int64 ┆ geometry │
+╞══════════╪══════════════════════════════════════════════════════════════════╡
+│ 1055 ┆ POINT Z(258976.3273 4820275.6807 -0.5) │
+├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ 1023 ┆ POINT Z(258340.72730000038 4819923.080700001 0.6000000000058208) │
+├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ 1021 ┆ POINT Z(258338.4263000004 4819908.080700001 0.5) │
+├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ 985 ┆ POINT Z(258526.62729999982 4819583.580700001 0) │
+├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ 994 ┆ POINT Z(258498.92729999963 4819652.080700001 1.8999999999941792) │
+└──────────┴──────────────────────────────────────────────────────────────────┘
+</code></pre></div>
+
+<h3 id="choosing-an-approach">Choosing an approach<a class="headerlink"
href="#choosing-an-approach" title="Permanent link">¶</a></h3>
+<ul>
+<li>Use the GeoPandas-based approach for simplicity and exploratory
workflows.</li>
+<li>Use the ADBC-based approach for large datasets or production pipelines
+ where performance and memory efficiency are critical.</li>
+</ul>
@@ -1470,7 +1709,7 @@
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:06:11
UTC">February 10, 2026 19:06:11</span>
</span>
@@ -1505,7 +1744,7 @@
<div class="footer__top">
<div class="col-left">
- <img src="../../../image/footer/logo-footer.svg" alt=""
class="footer-logo">
+ <img src="../image/footer/logo-footer.svg" alt="" class="footer-logo">
</div>
<div class="col-right">
@@ -1579,10 +1818,10 @@
- <script id="__config" type="application/json">{"annotate": null, "base":
"../../..", "features": ["content.code.copy", "content.action.edit",
"search.highlight", "search.share", "search.suggest", "navigation.footer",
"navigation.instant", "navigation.top", "navigation.sections",
"navigation.tabs", "navigation.tabs.sticky"], "search":
"../../../assets/javascripts/workers/search.2c215733.min.js", "tags": null,
"translations": {"clipboard.copied": "Copied to clipboard", "clipboard.cop [...]
+ <script id="__config" type="application/json">{"annotate": null, "base":
"..", "features": ["content.code.copy", "content.action.edit",
"search.highlight", "search.share", "search.suggest", "navigation.footer",
"navigation.instant", "navigation.top", "navigation.sections",
"navigation.tabs", "navigation.tabs.sticky"], "search":
"../assets/javascripts/workers/search.2c215733.min.js", "tags": null,
"translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy":
"Copy to [...]
- <script
src="../../../assets/javascripts/bundle.79ae519e.min.js"></script>
+ <script src="../assets/javascripts/bundle.79ae519e.min.js"></script>
diff --git
a/latest-snapshot/reference/functions/__pycache__/_matplotlib_defaults.cpython-314.pyc
b/latest-snapshot/reference/functions/__pycache__/_matplotlib_defaults.cpython-314.pyc
index c23ab95a..7f2c8259 100644
Binary files
a/latest-snapshot/reference/functions/__pycache__/_matplotlib_defaults.cpython-314.pyc
and
b/latest-snapshot/reference/functions/__pycache__/_matplotlib_defaults.cpython-314.pyc
differ
diff --git
a/latest-snapshot/reference/functions/__pycache__/_render_meta.cpython-314.pyc
b/latest-snapshot/reference/functions/__pycache__/_render_meta.cpython-314.pyc
index e01f0a33..309a423b 100644
Binary files
a/latest-snapshot/reference/functions/__pycache__/_render_meta.cpython-314.pyc
and
b/latest-snapshot/reference/functions/__pycache__/_render_meta.cpython-314.pyc
differ
diff --git a/latest-snapshot/reference/functions/index.html
b/latest-snapshot/reference/functions/index.html
index 5c6f0154..aec274ba 100644
--- a/latest-snapshot/reference/functions/index.html
+++ b/latest-snapshot/reference/functions/index.html
@@ -1574,7 +1574,7 @@ input geometry is less than or equal to a specified
distance.</p>
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:10:38
UTC">February 10, 2026 19:10:38</span>
</span>
diff --git a/latest-snapshot/reference/functions/st_analyze_agg/index.html
b/latest-snapshot/reference/functions/st_analyze_agg/index.html
index d2b689f5..565c0435 100644
--- a/latest-snapshot/reference/functions/st_analyze_agg/index.html
+++ b/latest-snapshot/reference/functions/st_analyze_agg/index.html
@@ -1486,7 +1486,7 @@ geometries. The fields of its struct return type are:</p>
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:10:38
UTC">February 10, 2026 19:10:38</span>
</span>
diff --git a/latest-snapshot/reference/functions/st_area/index.html
b/latest-snapshot/reference/functions/st_area/index.html
index 38a848fb..7705be2a 100644
--- a/latest-snapshot/reference/functions/st_area/index.html
+++ b/latest-snapshot/reference/functions/st_area/index.html
@@ -1470,7 +1470,7 @@
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:10:38
UTC">February 10, 2026 19:10:38</span>
</span>
diff --git a/latest-snapshot/reference/functions/st_asbinary/index.html
b/latest-snapshot/reference/functions/st_asbinary/index.html
index df5335b6..26d3eaab 100644
--- a/latest-snapshot/reference/functions/st_asbinary/index.html
+++ b/latest-snapshot/reference/functions/st_asbinary/index.html
@@ -1471,7 +1471,7 @@ geometry or geography. This function also has the alias
ST_AsWKB.</p>
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:10:38
UTC">February 10, 2026 19:10:38</span>
</span>
diff --git a/latest-snapshot/reference/functions/st_buffer/index.html
b/latest-snapshot/reference/functions/st_buffer/index.html
index 98d0488e..e2a164e6 100644
--- a/latest-snapshot/reference/functions/st_buffer/index.html
+++ b/latest-snapshot/reference/functions/st_buffer/index.html
@@ -1484,7 +1484,7 @@ input geometry is less than or equal to a specified
distance.</p>
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:10:38
UTC">February 10, 2026 19:10:38</span>
</span>
diff --git a/latest-snapshot/reference/functions/st_intersection/index.html
b/latest-snapshot/reference/functions/st_intersection/index.html
index ad1a1ec9..e53f78f6 100644
--- a/latest-snapshot/reference/functions/st_intersection/index.html
+++ b/latest-snapshot/reference/functions/st_intersection/index.html
@@ -1466,7 +1466,7 @@
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21
13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6
0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4
2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10
9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1
7.5 7.1 7.9l-.1.2z"></path></svg>
</span>
- <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 17:53:29
UTC">February 10, 2026 17:53:29</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="February 10, 2026 19:10:38
UTC">February 10, 2026 19:10:38</span>
</span>
diff --git a/latest-snapshot/search/search_index.json
b/latest-snapshot/search/search_index.json
index bc38f223..e8d22b67 100644
--- a/latest-snapshot/search/search_index.json
+++ b/latest-snapshot/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Introducing
SedonaDB","text":"<p>SedonaDB is an open-source single-node analytical
database engine with geospatial as a first-class citizen. It aims to deliver
the fastest spatial analytics query speed and the most comprehensive function
coverage available.</p> <p>SedonaDB is perfect for process [...]
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Introducing
SedonaDB","text":"<p>SedonaDB is an open-source single-node analytical
database engine with geospatial as a first-class citizen. It aims to deliver
the fastest spatial analytics query speed and the most comprehensive function
coverage available.</p> <p>SedonaDB is perfect for process [...]
\ No newline at end of file
diff --git a/latest-snapshot/sitemap.xml b/latest-snapshot/sitemap.xml
index d05beeee..7bd639e5 100644
--- a/latest-snapshot/sitemap.xml
+++ b/latest-snapshot/sitemap.xml
@@ -28,6 +28,10 @@
<loc>https://sedona.apache.org/sedonadb/latest/overture-examples/</loc>
<lastmod>2026-02-10</lastmod>
</url>
+ <url>
+ <loc>https://sedona.apache.org/sedonadb/latest/postgis/</loc>
+ <lastmod>2026-02-10</lastmod>
+ </url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/programming-guide/</loc>
<lastmod>2026-02-10</lastmod>
diff --git a/latest-snapshot/sitemap.xml.gz b/latest-snapshot/sitemap.xml.gz
index 7e21d701..9fcd2220 100644
Binary files a/latest-snapshot/sitemap.xml.gz and
b/latest-snapshot/sitemap.xml.gz differ