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 69f78e7 Deployed 9bc6ffe to latest-snapshot with MkDocs 1.6.1 and
mike 2.1.3
69f78e7 is described below
commit 69f78e75032cb80fc3178dcaad80d460347478b9
Author: GitHub Actions <[email protected]>
AuthorDate: Mon Sep 22 04:06:48 2025 +0000
Deployed 9bc6ffe to latest-snapshot with MkDocs 1.6.1 and mike 2.1.3
---
latest-snapshot/404.html | 23 +
latest-snapshot/contributors-guide/index.html | 29 +-
latest-snapshot/crs-examples.ipynb | 481 ++++++++++++++++++
.../{quickstart-python => crs-examples}/index.html | 556 ++++++++++++---------
latest-snapshot/geopandas-interop/index.html | 23 +
latest-snapshot/index.html | 23 +
latest-snapshot/overture-examples/index.html | 23 +
latest-snapshot/programming-guide/index.html | 23 +
latest-snapshot/quickstart-python/index.html | 23 +
latest-snapshot/reference/python/index.html | 29 +-
latest-snapshot/reference/sql-joins/index.html | 23 +
latest-snapshot/reference/sql/index.html | 23 +
latest-snapshot/search/search_index.json | 2 +-
latest-snapshot/sitemap.xml | 26 +-
latest-snapshot/sitemap.xml.gz | Bin 314 -> 318 bytes
latest-snapshot/tags/index.html | 23 +
.../working-with-parquet-files/index.html | 23 +
17 files changed, 1091 insertions(+), 262 deletions(-)
diff --git a/latest-snapshot/404.html b/latest-snapshot/404.html
index 41d5baa..3fad8bc 100644
--- a/latest-snapshot/404.html
+++ b/latest-snapshot/404.html
@@ -602,6 +602,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="/sedonadb/latest/crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/contributors-guide/index.html
b/latest-snapshot/contributors-guide/index.html
index cd571cb..2c1a41c 100644
--- a/latest-snapshot/contributors-guide/index.html
+++ b/latest-snapshot/contributors-guide/index.html
@@ -13,7 +13,7 @@
<link rel="prev" href="../working-with-parquet-files/">
- <link rel="next" href="../reference/python/">
+ <link rel="next" href="../crs-examples/">
<link rel="icon" href="../image/sedona_logo_symbol.png">
@@ -796,6 +796,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
@@ -1556,13 +1579,13 @@ save and load various baselines).</p>
- <a href="../reference/python/" class="md-footer__link
md-footer__link--next" aria-label="Next: Python Functions">
+ <a href="../crs-examples/" class="md-footer__link
md-footer__link--next" aria-label="Next: CRS Examples">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
- Python Functions
+ CRS Examples
</div>
</div>
<div class="md-footer__button md-icon">
diff --git a/latest-snapshot/crs-examples.ipynb
b/latest-snapshot/crs-examples.ipynb
new file mode 100644
index 0000000..74192a3
--- /dev/null
+++ b/latest-snapshot/crs-examples.ipynb
@@ -0,0 +1,481 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "91910e50-a5ae-4d5a-a431-62ac5fbc11ca",
+ "metadata": {},
+ "source": [
+ "# Coordinate Reference System (CRS) Examples\n",
+ "\n",
+ "This example demonstrates how one table with an EPSG 4326 CRS cannot be
joined with another table that uses EPSG 3857."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "be8ffe47-dc89-4842-bb1e-1e8640afffc3",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import sedonadb\n",
+ "\n",
+ "sd = sedonadb.connect()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "54b48173-6be0-4827-ac42-1439eb31e9f7",
+ "metadata": {},
+ "source": [
+ "Read a table with a geometry column that uses EPSG 4326.\n",
+ "\n",
+ "Note how SedonaDB reads the CRS specified in the Parquet file."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "143f00d5-6878-4dab-a82c-c9fb4dbfaf00",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "countries = sd.read_parquet(\n",
+ "
\"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_geo.parquet\"\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "8ef94b7b-b65d-4da5-9443-3253e84e2e7f",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "SedonaSchema with 3 fields:\n",
+ " name: Utf8View\n",
+ " continent: Utf8View\n",
+ " geometry: wkb_view <epsg:4326>"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "countries.schema"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "12d94c4f-5e7f-47c6-b5cc-3a3363bbc290",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "cities = sd.sql(\"\"\"\n",
+ "SELECT city, ST_SetSRID(ST_GeomFromText(wkt), 3857) AS geometry FROM
(VALUES\n",
+ " ('New York', 'POINT(-8238310.24 4969803.34)'),\n",
+ " ('Los Angeles', 'POINT(-13153204.78 4037636.04)'),\n",
+ " ('Chicago', 'POINT(-9757148.04 5138517.44)'))\n",
+ "AS t(city, wkt)\"\"\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "36e53438-c2d2-444e-9f34-d391f0f3f588",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "SedonaSchema with 2 fields:\n",
+ " city: Utf8\n",
+ " geometry: wkb <epsg:3857>"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "cities.schema"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "62c87571-50aa-4f57-a7dd-4afa3210320a",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "cities.to_view(\"cities\", overwrite=True)\n",
+ "countries.to_view(\"countries\", overwrite=True)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "561b3c8c-4952-4fa7-9fe1-3fa0522b0d9f",
+ "metadata": {},
+ "source": [
+ "## Join with mismatched CRSs\n",
+ "\n",
+ "The cities and countries tables have different CRSs.\n",
+ "\n",
+ "The cities table uses EPSG:3857 and the countries table uses
EPSG:4326.\n",
+ "\n",
+ "Let's confirm that the code errors out if we try to join the mismatched
tables."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "906bad37-4f3f-4028-82b4-487fabe5957f",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "SedonaError",
+ "evalue": "type_coercion\ncaused by\nError during planning: Mismatched
CRS arguments: epsg:3857 vs epsg:4326\nUse ST_Transform() or ST_SetSRID() to
ensure arguments are compatible.",
+ "output_type": "error",
+ "traceback": [
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mSedonaError\u001b[0m
Traceback (most recent call last)",
+ "Cell \u001b[0;32mIn[7], line 6\u001b[0m\n\u001b[1;32m 1\u001b[0m
\u001b[38;5;66;03m# join doesn't work when CRSs don't
match\u001b[39;00m\n\u001b[1;32m 2\u001b[0m
\u001b[43msd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msql\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\"\"\u001b[39;49m\n\u001b[1;32m
3\u001b[0m \u001b[38;5;124;43mselect * from
cities\u001b[39;49m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124;43mjoin
countries\u001b[39;49m\n\u001b[1;32m [...]
+ "File
\u001b[0;32m/opt/miniconda3/lib/python3.12/site-packages/sedonadb/dataframe.py:297\u001b[0m,
in \u001b[0;36mDataFrame.show\u001b[0;34m(self, limit, width,
ascii)\u001b[0m\n\u001b[1;32m 272\u001b[0m
\u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Print the first limit rows
to the console\u001b[39;00m\n\u001b[1;32m 273\u001b[0m \n\u001b[1;32m
274\u001b[0m \u001b[38;5;124;03mArgs:\u001b[39;00m\n\u001b[0;32m
(...)\u001b[0m\n\u001b[1;32m 294\u001b[0m \n\u001b[1;32 [...]
+ "\u001b[0;31mSedonaError\u001b[0m: type_coercion\ncaused by\nError
during planning: Mismatched CRS arguments: epsg:3857 vs epsg:4326\nUse
ST_Transform() or ST_SetSRID() to ensure arguments are compatible."
+ ]
+ }
+ ],
+ "source": [
+ "# join doesn't work when CRSs don't match\n",
+ "sd.sql(\"\"\"\n",
+ "select * from cities\n",
+ "join countries\n",
+ "where ST_Intersects(cities.geometry, countries.geometry)\n",
+ "\"\"\").show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "41e6f59f-5217-40b2-b05a-9c95eae29df8",
+ "metadata": {},
+ "source": [
+ "## Convert CRS and then join\n",
+ "\n",
+ "Let's convert the cities table to use EPSG:4326 and then perform the join
with the two tables once they have matching CRSs."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "id": "122857c1-f68d-4037-9787-54c20706e60f",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# update cities to use 4326\n",
+ "cities = sd.sql(\"\"\"\n",
+ "SELECT city, ST_Transform(geometry, 'EPSG:4326') as geometry\n",
+ "FROM cities\n",
+ "\"\"\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "id": "947e085c-62a4-4315-b155-007a95156964",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "SedonaSchema with 2 fields:\n",
+ " city: Utf8\n",
+ " geometry: wkb <ogc:crs84>"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "cities.schema"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "id": "3bcbaf7a-ec40-4b7e-85c2-db5ef1e3232e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "cities.to_view(\"cities\", overwrite=True)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "id": "819c8d04-fa03-4ef8-aecb-e79d48f0b820",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+
"┌─────────────┬──────────────────────┬──────────────────────┬───────────────┬──────────────────────┐\n",
+ "│ city ┆ geometry ┆ name ┆
continent ┆ geometry │\n",
+ "│ utf8 ┆ geometry ┆ utf8view ┆
utf8view ┆ geometry │\n",
+
"╞═════════════╪══════════════════════╪══════════════════════╪═══════════════╪══════════════════════╡\n",
+ "│ New York ┆ POINT(-74.006000039… ┆ United States of Am… ┆ North
America ┆ MULTIPOLYGON(((-122… │\n",
+
"├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ Los Angeles ┆ POINT(-118.15724889… ┆ United States of Am… ┆ North
America ┆ MULTIPOLYGON(((-122… │\n",
+
"├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ Chicago ┆ POINT(-87.649952137… ┆ United States of Am… ┆ North
America ┆ MULTIPOLYGON(((-122… │\n",
+
"└─────────────┴──────────────────────┴──────────────────────┴───────────────┴──────────────────────┘\n"
+ ]
+ }
+ ],
+ "source": [
+ "# join works when CRSs match\n",
+ "sd.sql(\"\"\"\n",
+ "select * from cities\n",
+ "join countries\n",
+ "where ST_Intersects(cities.geometry, countries.geometry)\n",
+ "\"\"\").show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5279bebd-1d8d-4f33-bcd9-2c1e93ff7221",
+ "metadata": {},
+ "source": [
+ "## Example #2: Joining two tables with different CRSs\n",
+ "\n",
+ "This example shows how to join a `vermont` table with an EPSG 32618 CRS
with a `buildings` table that uses an EPSG 4326 CRS.\n",
+ "\n",
+ "The example highlights the following features:\n",
+ "\n",
+ "1. SedonaDB reads the CRS stored in the files\n",
+ "2. SedonaDB protects you from accidentally joining files with mismatched
CRSs\n",
+ "3. It's easy to convert a GeoPandas DataFrame => a SedonaDB DataFrame and
maintain the CRS"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "d9ea1469-8e6d-4ef1-a440-5573c1345f0d",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import geopandas as gpd\n",
+ "\n",
+ "path =
\"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-utm.fgb\"\n",
+ "gdf = gpd.read_file(path)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "46660482-3fed-4e6c-b37a-2947326e884a",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "vermont = sd.create_data_frame(gdf)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "1571aa5e-638c-493a-90a1-0cffbeea0bd9",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "SedonaSchema with 1 field:\n",
+ " geometry: wkb <epsg:32618>"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "vermont.schema"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "eb4b33f1-972e-4c18-bdbd-fd4fe268b339",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "buildings = sd.read_parquet(\n",
+ "
\"https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet\"\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "22baf082-736e-4881-9704-d57eea07068c",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "┌─────────────────────────────────┐\n",
+ "│ geometry │\n",
+ "│ geometry │\n",
+ "╞═════════════════════════════════╡\n",
+ "│ POINT(-77.10109681 42.53495524) │\n",
+ "├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ POINT(-77.10048552 42.53695011) │\n",
+ "├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n",
+ "│ POINT(-77.10096508 42.53681338) │\n",
+ "└─────────────────────────────────┘\n"
+ ]
+ }
+ ],
+ "source": [
+ "buildings.show(3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "id": "e1d2d89d-8227-43ea-8507-fd6524fe2ac5",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "SedonaSchema with 1 field:\n",
+ " geometry: wkb_view <ogc:crs84>"
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "buildings.schema"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "id": "e959081e-3a8d-4041-b00f-a19bca10be39",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "129735970"
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "buildings.count()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "id": "d9ef702f-e424-4e53-9629-da6ed256ee7f",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "buildings.to_view(\"buildings\", overwrite=True)\n",
+ "vermont.to_view(\"vermont\", overwrite=True)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "id": "0c300dad-aa60-4291-a10b-d2a332b37593",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "SedonaError",
+ "evalue": "type_coercion\ncaused by\nError during planning: Mismatched
CRS arguments: ogc:crs84 vs epsg:32618\nUse ST_Transform() or ST_SetSRID() to
ensure arguments are compatible.",
+ "output_type": "error",
+ "traceback": [
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mSedonaError\u001b[0m
Traceback (most recent call last)",
+ "Cell \u001b[0;32mIn[12], line 5\u001b[0m\n\u001b[1;32m 1\u001b[0m
\u001b[43msd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msql\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\"\"\u001b[39;49m\n\u001b[1;32m
2\u001b[0m \u001b[38;5;124;43mselect count(*) from
buildings\u001b[39;49m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;43mjoin
vermont\u001b[39;49m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124;43mwhere
ST_Intersects(buildings.geometry, vermont.geometry)\u [...]
+ "File
\u001b[0;32m/opt/miniconda3/lib/python3.12/site-packages/sedonadb/dataframe.py:297\u001b[0m,
in \u001b[0;36mDataFrame.show\u001b[0;34m(self, limit, width,
ascii)\u001b[0m\n\u001b[1;32m 272\u001b[0m
\u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Print the first limit rows
to the console\u001b[39;00m\n\u001b[1;32m 273\u001b[0m \n\u001b[1;32m
274\u001b[0m \u001b[38;5;124;03mArgs:\u001b[39;00m\n\u001b[0;32m
(...)\u001b[0m\n\u001b[1;32m 294\u001b[0m \n\u001b[1;32 [...]
+ "\u001b[0;31mSedonaError\u001b[0m: type_coercion\ncaused by\nError
during planning: Mismatched CRS arguments: ogc:crs84 vs epsg:32618\nUse
ST_Transform() or ST_SetSRID() to ensure arguments are compatible."
+ ]
+ }
+ ],
+ "source": [
+ "sd.sql(\"\"\"\n",
+ "select count(*) from buildings\n",
+ "join vermont\n",
+ "where ST_Intersects(buildings.geometry, vermont.geometry)\n",
+ "\"\"\").show()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "id": "648984ce-ac7a-4f76-ac9f-17bd5c628bd0",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "┌──────────┐\n",
+ "│ count(*) │\n",
+ "│ int64 │\n",
+ "╞══════════╡\n",
+ "│ 361856 │\n",
+ "└──────────┘\n"
+ ]
+ }
+ ],
+ "source": [
+ "sd.sql(\"\"\"\n",
+ "select count(*) from buildings\n",
+ "join vermont\n",
+ "where ST_Intersects(buildings.geometry, ST_Transform(vermont.geometry,
'EPSG:4326'))\n",
+ "\"\"\").show()"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "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.12.4"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/latest-snapshot/quickstart-python/index.html
b/latest-snapshot/crs-examples/index.html
similarity index 56%
copy from latest-snapshot/quickstart-python/index.html
copy to latest-snapshot/crs-examples/index.html
index ef0a7e0..be5f278 100644
--- a/latest-snapshot/quickstart-python/index.html
+++ b/latest-snapshot/crs-examples/index.html
@@ -7,13 +7,13 @@
- <link rel="canonical"
href="https://sedona.apache.org/sedonadb/latest/quickstart-python/">
+ <link rel="canonical"
href="https://sedona.apache.org/sedonadb/latest/crs-examples/">
- <link rel="prev" href="..">
+ <link rel="prev" href="../contributors-guide/">
- <link rel="next" href="../programming-guide/">
+ <link rel="next" href="../reference/python/">
<link rel="icon" href="../image/sedona_logo_symbol.png">
@@ -21,7 +21,7 @@
- <title>Quickstart - SedonaDB</title>
+ <title>CRS Examples - SedonaDB</title>
@@ -86,7 +86,7 @@
<div data-md-component="skip">
- <a href="#python-quickstart" class="md-skip">
+ <a href="#coordinate-reference-system-crs-examples" class="md-skip">
Skip to content
</a>
@@ -125,7 +125,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
- Quickstart
+ CRS Examples
</span>
</div>
@@ -228,11 +228,9 @@
-
-
- <li class="md-tabs__item md-tabs__item--active">
- <a href="./" class="md-tabs__link">
+ <li class="md-tabs__item">
+ <a href="../quickstart-python/" class="md-tabs__link">
@@ -249,10 +247,12 @@
+
+
- <li class="md-tabs__item">
+ <li class="md-tabs__item md-tabs__item--active">
<a href="../programming-guide/" class="md-tabs__link">
@@ -447,32 +447,10 @@
-
-
- <li class="md-nav__item md-nav__item--active">
-
- <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
-
-
-
-
-
- <label class="md-nav__link md-nav__link--active" for="__toc">
-
-
-
- <span class="md-ellipsis">
- Quickstart
-
- </span>
-
-
- <span class="md-nav__icon md-icon"></span>
- </label>
-
- <a href="./" class="md-nav__link md-nav__link--active">
+ <li class="md-nav__item">
+ <a href="../quickstart-python/" class="md-nav__link">
@@ -483,44 +461,6 @@
</a>
-
-
-
-<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
-
-
-
-
-
-
- <label class="md-nav__title" for="__toc">
- <span class="md-nav__icon md-icon"></span>
- Table of contents
- </label>
- <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
-
- <li class="md-nav__item">
- <a href="#point-in-polygon-join" class="md-nav__link">
- <span class="md-ellipsis">
- Point in polygon join
- </span>
- </a>
-
-</li>
-
- <li class="md-nav__item">
- <a href="#manually-create-sedonadb-dataframes" class="md-nav__link">
- <span class="md-ellipsis">
- Manually create SedonaDB DataFrames
- </span>
- </a>
-
-</li>
-
- </ul>
-
-</nav>
-
</li>
@@ -529,6 +469,8 @@
+
+
@@ -536,19 +478,22 @@
+
+
+
- <li class="md-nav__item md-nav__item--nested">
+ <li class="md-nav__item md-nav__item--active md-nav__item--section
md-nav__item--nested">
- <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3">
+ <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3"
checked>
- <label class="md-nav__link" for="__nav_3" id="__nav_3_label"
tabindex="0">
+ <label class="md-nav__link" for="__nav_3" id="__nav_3_label"
tabindex="">
@@ -561,7 +506,7 @@
<span class="md-nav__icon md-icon"></span>
</label>
- <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label"
aria-expanded="false">
+ <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label"
aria-expanded="true">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
SedonaDB Guides
@@ -683,6 +628,98 @@
+
+
+
+
+
+
+
+
+ <li class="md-nav__item md-nav__item--active">
+
+ <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
+
+
+
+
+
+ <label class="md-nav__link md-nav__link--active" for="__toc">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ <span class="md-nav__icon md-icon"></span>
+ </label>
+
+ <a href="./" class="md-nav__link md-nav__link--active">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+
+
+
+<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
+
+
+
+
+
+
+ <label class="md-nav__title" for="__toc">
+ <span class="md-nav__icon md-icon"></span>
+ Table of contents
+ </label>
+ <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
+
+ <li class="md-nav__item">
+ <a href="#join-with-mismatched-crss" class="md-nav__link">
+ <span class="md-ellipsis">
+ Join with mismatched CRSs
+ </span>
+ </a>
+
+</li>
+
+ <li class="md-nav__item">
+ <a href="#convert-crs-and-then-join" class="md-nav__link">
+ <span class="md-ellipsis">
+ Convert CRS and then join
+ </span>
+ </a>
+
+</li>
+
+ <li class="md-nav__item">
+ <a href="#example-2-joining-two-tables-with-different-crss"
class="md-nav__link">
+ <span class="md-ellipsis">
+ Example #2: Joining two tables with different CRSs
+ </span>
+ </a>
+
+</li>
+
+ </ul>
+
+</nav>
+
+ </li>
+
+
+
+
</ul>
</nav>
@@ -1026,18 +1063,27 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
- <a href="#point-in-polygon-join" class="md-nav__link">
+ <a href="#join-with-mismatched-crss" class="md-nav__link">
<span class="md-ellipsis">
- Point in polygon join
+ Join with mismatched CRSs
</span>
</a>
</li>
<li class="md-nav__item">
- <a href="#manually-create-sedonadb-dataframes" class="md-nav__link">
+ <a href="#convert-crs-and-then-join" class="md-nav__link">
<span class="md-ellipsis">
- Manually create SedonaDB DataFrames
+ Convert CRS and then join
+ </span>
+ </a>
+
+</li>
+
+ <li class="md-nav__item">
+ <a href="#example-2-joining-two-tables-with-different-crss"
class="md-nav__link">
+ <span class="md-ellipsis">
+ Example #2: Joining two tables with different CRSs
</span>
</a>
@@ -1059,7 +1105,7 @@
- <a
href="https://github.com/apache/sedona-db/blob/main/docs/quickstart-python.md"
title="Edit this page" class="md-content__button md-icon" rel="edit">
+ <a
href="https://github.com/apache/sedona-db/blob/main/docs/crs-examples.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>
@@ -1067,198 +1113,220 @@
-<!---
- 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
+<h1 id="coordinate-reference-system-crs-examples">Coordinate Reference System
(CRS) Examples<a class="headerlink"
href="#coordinate-reference-system-crs-examples" title="Permanent
link">¶</a></h1>
+<p>This example demonstrates how one table with an EPSG 4326 CRS cannot be
joined with another table that uses EPSG 3857.</p>
+<div class="highlight"><pre><span></span><code><span
class="kn">import</span><span class="w"> </span><span class="nn">sedonadb</span>
- 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="python-quickstart">Python Quickstart<a class="headerlink"
href="#python-quickstart" title="Permanent link">¶</a></h1>
-<p>SedonaDB for Python can be installed from <a
href="https://pypi.org">PyPI</a>:</p>
-<div class="highlight"><pre><span></span><code>pip<span class="w">
</span>install<span class="w"> </span><span
class="s2">"apache-sedona[db]"</span>
+<span class="n">sd</span> <span class="o">=</span> <span
class="n">sedonadb</span><span class="o">.</span><span
class="n">connect</span><span class="p">()</span>
+</code></pre></div>
+<p>Read a table with a geometry column that uses EPSG 4326.</p>
+<p>Note how SedonaDB reads the CRS specified in the Parquet file.</p>
+<div class="highlight"><pre><span></span><code><span
class="n">countries</span> <span class="o">=</span> <span
class="n">sd</span><span class="o">.</span><span
class="n">read_parquet</span><span class="p">(</span>
+ <span
class="s2">"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_geo.parquet"</span>
+<span class="p">)</span>
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span
class="n">countries</span><span class="o">.</span><span class="n">schema</span>
+</code></pre></div>
+<div class="codehilite"><pre><span></span><code>SedonaSchema with 3 fields:
+ name: Utf8View
+ continent: Utf8View
+ geometry: wkb_view <epsg:4326>
</code></pre></div>
-<p>If you can import the module and connect to a new session, you're good to
go!</p>
-<div class="highlight"><pre><span></span><code><span
class="kn">import</span><span class="w"> </span><span
class="nn">sedona.db</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">sd</span><span class="o">.</span><span
class="n">sql</span><span class="p">(</span><span class="s2">"SELECT
ST_Point(0, 1) as geom"</span><span class="p">)</span><span
class="o">.</span><span class="n">show</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><span class="n">cities</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 city, ST_SetSRID(ST_GeomFromText(wkt), 3857) AS
geometry FROM (VALUES</span>
+<span class="s2"> ('New York', 'POINT(-8238310.24 4969803.34)'),</span>
+<span class="s2"> ('Los Angeles', 'POINT(-13153204.78 4037636.04)'),</span>
+<span class="s2"> ('Chicago', 'POINT(-9757148.04 5138517.44)'))</span>
+<span class="s2">AS t(city, wkt)"""</span><span class="p">)</span>
</code></pre></div>
-<div class="codehilite"><pre><span></span><code>┌────────────┐
-│ geom │
-│ geometry │
-╞════════════╡
-│ POINT(0 1) │
-└────────────┘
+<div class="highlight"><pre><span></span><code><span
class="n">cities</span><span class="o">.</span><span class="n">schema</span>
+</code></pre></div>
+<div class="codehilite"><pre><span></span><code>SedonaSchema with 2 fields:
+ city: Utf8
+ geometry: wkb <epsg:3857>
</code></pre></div>
-<h2 id="point-in-polygon-join">Point in polygon join<a class="headerlink"
href="#point-in-polygon-join" title="Permanent link">¶</a></h2>
-<div class="highlight"><pre><span></span><code><span class="n">cities</span>
<span class="o">=</span> <span class="n">sd</span><span class="o">.</span><span
class="n">read_parquet</span><span class="p">(</span>
- <span
class="s2">"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_cities_geo.parquet"</span>
-<span class="p">)</span>
+<div class="highlight"><pre><span></span><code><span
class="n">cities</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"cities"</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">countries</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"countries"</span><span class="p">,</span> <span
class="n">overwrite</span><span class="o">=</span><span
class="kc">True</span><span class="p">)</span>
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span
class="n">cities</span><span class="o">.</span><span class="n">show</span><span
class="p">()</span>
+<h2 id="join-with-mismatched-crss">Join with mismatched CRSs<a
class="headerlink" href="#join-with-mismatched-crss" title="Permanent
link">¶</a></h2>
+<p>The cities and countries tables have different CRSs.</p>
+<p>The cities table uses EPSG:3857 and the countries table uses EPSG:4326.</p>
+<p>Let's confirm that the code errors out if we try to join the mismatched
tables.</p>
+<div class="highlight"><pre><span></span><code><span class="c1"># join doesn't
work when CRSs don't match</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 * from cities</span>
+<span class="s2">join countries</span>
+<span class="s2">where ST_Intersects(cities.geometry,
countries.geometry)</span>
+<span class="s2">"""</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>┌──────────────┬───────────────────────────────┐
-│ name ┆ geometry │
-│ utf8view ┆ geometry │
-╞══════════════╪═══════════════════════════════╡
-│ Vatican City ┆ POINT(12.4533865 41.9032822) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ San Marino ┆ POINT(12.4417702 43.9360958) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Vaduz ┆ POINT(9.5166695 47.1337238) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Lobamba ┆ POINT(31.1999971 -26.4666675) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Luxembourg ┆ POINT(6.1300028 49.6116604) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Palikir ┆ POINT(158.1499743 6.9166437) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Majuro ┆ POINT(171.3800002 7.1030043) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Funafuti ┆ POINT(179.2166471 -8.516652) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Melekeok ┆ POINT(134.6265485 7.4873962) │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Bir Lehlou ┆ POINT(-9.6525222 26.1191667) │
-└──────────────┴───────────────────────────────┘
+<div class="codehilite"><pre><span></span><code><span
class="o">---------------------------------------------------------------------------</span>
+
+<span class="nx">SedonaError</span><span class="w">
</span><span class="nx">Traceback</span><span class="w"> </span><span
class="p">(</span><span class="nx">most</span><span class="w"> </span><span
class="nx">recent</span><span class="w"> </span><span
class="nx">call</span><span class="w"> </span><span class="nx">last</span><span
class="p">)</span>
+
+<span class="nx">Cell</span><span class="w"> </span><span
class="nx">In</span><span class="p">[</span><span class="mi">7</span><span
class="p">],</span><span class="w"> </span><span class="nx">line</span><span
class="w"> </span><span class="mi">6</span>
+<span class="w"> </span><span class="mi">1</span><span class="w">
</span><span class="err">#</span><span class="w"> </span><span
class="nx">join</span><span class="w"> </span><span
class="nx">doesn</span><span class="err">'</span><span class="nx">t</span><span
class="w"> </span><span class="nx">work</span><span class="w"> </span><span
class="nx">when</span><span class="w"> </span><span class="nx">CRSs</span><span
class="w"> </span><span class="nx">don</span><span class="err">'</span [...]
+<span class="w"> </span><span class="mi">2</span><span class="w">
</span><span class="nx">sd</span><span class="p">.</span><span
class="nx">sql</span><span class="p">(</span><span class="s">"""</span>
+<span class="s"> 3 select * from cities</span>
+<span class="s"> 4 join countries</span>
+<span class="s"> 5 where ST_Intersects(cities.geometry,
countries.geometry)</span>
+<span class="s">----> 6 """</span><span class="p">).</span><span
class="nx">show</span><span class="p">()</span>
+
+
+<span class="nx">File</span><span class="w"> </span><span
class="o">/</span><span class="nx">opt</span><span class="o">/</span><span
class="nx">miniconda3</span><span class="o">/</span><span
class="nx">lib</span><span class="o">/</span><span
class="nx">python3</span><span class="m m-Double">.12</span><span
class="o">/</span><span class="nx">site</span><span class="o">-</span><span
class="nx">packages</span><span class="o">/</span><span
class="nx">sedonadb</span><span class="o">/</span><s [...]
+<span class="w"> </span><span class="mi">272</span><span class="w">
</span><span class="s">"""Print the first limit rows to the console</span>
+<span class="s"> 273 </span>
+<span class="s"> 274 Args:</span>
+<span class="s"> (...)</span>
+<span class="s"> 294 </span>
+<span class="s"> 295 """</span>
+<span class="w"> </span><span class="mi">296</span><span class="w">
</span><span class="nx">width</span><span class="w"> </span><span
class="p">=</span><span class="w"> </span><span
class="nx">_out_width</span><span class="p">(</span><span
class="nx">width</span><span class="p">)</span>
+<span class="o">--</span><span class="p">></span><span class="w">
</span><span class="mi">297</span><span class="w"> </span><span
class="nx">print</span><span class="p">(</span><span
class="kp">self</span><span class="p">.</span><span
class="nx">_impl</span><span class="p">.</span><span
class="nx">show</span><span class="p">(</span><span class="kp">self</span><span
class="p">.</span><span class="nx">_ctx</span><span class="p">,</span><span
class="w"> </span><span class="nx">limit</spa [...]
+
+
+<span class="nx">SedonaError</span><span class="p">:</span><span class="w">
</span><span class="nx">type_coercion</span>
+<span class="nx">caused</span><span class="w"> </span><span
class="nx">by</span>
+<span class="nx">Error</span><span class="w"> </span><span
class="nx">during</span><span class="w"> </span><span
class="nx">planning</span><span class="p">:</span><span class="w"> </span><span
class="nx">Mismatched</span><span class="w"> </span><span
class="nx">CRS</span><span class="w"> </span><span
class="nx">arguments</span><span class="p">:</span><span class="w">
</span><span class="nx">epsg</span><span class="p">:</span><span
class="mi">3857</span><span class="w"> </span><span class [...]
+<span class="nx">Use</span><span class="w"> </span><span
class="nx">ST_Transform</span><span class="p">()</span><span class="w">
</span><span class="k">or</span><span class="w"> </span><span
class="nx">ST_SetSRID</span><span class="p">()</span><span class="w">
</span><span class="nx">to</span><span class="w"> </span><span
class="nx">ensure</span><span class="w"> </span><span
class="nx">arguments</span><span class="w"> </span><span
class="nx">are</span><span class="w"> </span><span class= [...]
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span
class="n">countries</span> <span class="o">=</span> <span
class="n">sd</span><span class="o">.</span><span
class="n">read_parquet</span><span class="p">(</span>
- <span
class="s2">"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_geo.parquet"</span>
-<span class="p">)</span>
+<h2 id="convert-crs-and-then-join">Convert CRS and then join<a
class="headerlink" href="#convert-crs-and-then-join" title="Permanent
link">¶</a></h2>
+<p>Let's convert the cities table to use EPSG:4326 and then perform the join
with the two tables once they have matching CRSs.</p>
+<div class="highlight"><pre><span></span><code><span class="c1"># update
cities to use 4326</span>
+<span class="n">cities</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 city, ST_Transform(geometry, 'EPSG:4326') as
geometry</span>
+<span class="s2">FROM cities</span>
+<span class="s2">"""</span><span class="p">)</span>
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span
class="n">countries</span><span class="o">.</span><span
class="n">show</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><span
class="n">cities</span><span class="o">.</span><span class="n">schema</span>
</code></pre></div>
-<div
class="codehilite"><pre><span></span><code>┌─────────────────────────────┬───────────────┬────────────────────────────────────────────────────┐
-│ name ┆ continent ┆ geometry
│
-│ utf8view ┆ utf8view ┆ geometry
│
-╞═════════════════════════════╪═══════════════╪════════════════════════════════════════════════════╡
-│ Fiji ┆ Oceania ┆ MULTIPOLYGON(((180
-16.067132663642447,180 -16.55… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ United Republic of Tanzania ┆ Africa ┆ POLYGON((33.90371119710453
-0.9500000000000001,34… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Western Sahara ┆ Africa ┆ POLYGON((-8.665589565454809
27.656425889592356,-8… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Canada ┆ North America ┆
MULTIPOLYGON(((-122.84000000000003 49.00000000000… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ United States of America ┆ North America ┆
MULTIPOLYGON(((-122.84000000000003 49.00000000000… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Kazakhstan ┆ Asia ┆ POLYGON((87.35997033076265
49.21498078062912,86.5… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Uzbekistan ┆ Asia ┆ POLYGON((55.96819135928291
41.30864166926936,55.9… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Papua New Guinea ┆ Oceania ┆
MULTIPOLYGON(((141.00021040259185 -2.600151055515… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Indonesia ┆ Asia ┆
MULTIPOLYGON(((141.00021040259185 -2.600151055515… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Argentina ┆ South America ┆
MULTIPOLYGON(((-68.63401022758323 -52.63637045887… │
-└─────────────────────────────┴───────────────┴────────────────────────────────────────────────────┘
+<div class="codehilite"><pre><span></span><code>SedonaSchema with 2 fields:
+ city: Utf8
+ geometry: wkb <ogc:crs84>
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span
class="n">cities</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"cities"</span><span class="p">)</span>
-<span class="n">countries</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"countries"</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><span
class="n">cities</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"cities"</span><span class="p">,</span> <span
class="n">overwrite</span><span class="o">=</span><span
class="kc">True</span><span class="p">)</span>
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span class="c1"># join the
cities and countries tables</span>
+<div class="highlight"><pre><span></span><code><span class="c1"># join works
when CRSs match</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 * from cities</span>
<span class="s2">join countries</span>
<span class="s2">where ST_Intersects(cities.geometry,
countries.geometry)</span>
<span class="s2">"""</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>┌───────────────┬──────────────────────┬─────────────────────┬───────────────┬─────────────────────┐
-│ name ┆ geometry ┆ name ┆ continent ┆
geometry │
-│ utf8view ┆ geometry ┆ utf8view ┆ utf8view ┆
geometry │
-╞═══════════════╪══════════════════════╪═════════════════════╪═══════════════╪═════════════════════╡
-│ Suva ┆ POINT(178.4417073 -… ┆ Fiji ┆ Oceania ┆
MULTIPOLYGON(((180… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Dodoma ┆ POINT(35.7500036 -6… ┆ United Republic of… ┆ Africa ┆
POLYGON((33.903711… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Dar es Salaam ┆ POINT(39.266396 -6.… ┆ United Republic of… ┆ Africa ┆
POLYGON((33.903711… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Bir Lehlou ┆ POINT(-9.6525222 26… ┆ Western Sahara ┆ Africa ┆
POLYGON((-8.665589… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Ottawa ┆ POINT(-75.7019612 4… ┆ Canada ┆ North America ┆
MULTIPOLYGON(((-12… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Vancouver ┆ POINT(-123.1235901 … ┆ Canada ┆ North America ┆
MULTIPOLYGON(((-12… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Toronto ┆ POINT(-79.389458554… ┆ Canada ┆ North America ┆
MULTIPOLYGON(((-12… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ San Francisco ┆ POINT(-122.39959956… ┆ United States of A… ┆ North America ┆
MULTIPOLYGON(((-12… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Denver ┆ POINT(-104.9859618 … ┆ United States of A… ┆ North America ┆
MULTIPOLYGON(((-12… │
-├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ Houston ┆ POINT(-95.348436256… ┆ United States of A… ┆ North America ┆
MULTIPOLYGON(((-12… │
-└───────────────┴──────────────────────┴─────────────────────┴───────────────┴─────────────────────┘
+<div
class="codehilite"><pre><span></span><code>┌─────────────┬──────────────────────┬──────────────────────┬───────────────┬──────────────────────┐
+│ city ┆ geometry ┆ name ┆ continent ┆
geometry │
+│ utf8 ┆ geometry ┆ utf8view ┆ utf8view ┆
geometry │
+╞═════════════╪══════════════════════╪══════════════════════╪═══════════════╪══════════════════════╡
+│ New York ┆ POINT(-74.006000039… ┆ United States of Am… ┆ North America ┆
MULTIPOLYGON(((-122… │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ Los Angeles ┆ POINT(-118.15724889… ┆ United States of Am… ┆ North America ┆
MULTIPOLYGON(((-122… │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ Chicago ┆ POINT(-87.649952137… ┆ United States of Am… ┆ North America ┆
MULTIPOLYGON(((-122… │
+└─────────────┴──────────────────────┴──────────────────────┴───────────────┴──────────────────────┘
+</code></pre></div>
+
+<h2 id="example-2-joining-two-tables-with-different-crss">Example #2: Joining
two tables with different CRSs<a class="headerlink"
href="#example-2-joining-two-tables-with-different-crss" title="Permanent
link">¶</a></h2>
+<p>This example shows how to join a <code>vermont</code> table with an EPSG
32618 CRS with a <code>buildings</code> table that uses an EPSG 4326 CRS.</p>
+<p>The example highlights the following features:</p>
+<ol>
+<li>SedonaDB reads the CRS stored in the files</li>
+<li>SedonaDB protects you from accidentally joining files with mismatched
CRSs</li>
+<li>It's easy to convert a GeoPandas DataFrame => a SedonaDB DataFrame and
maintain the CRS</li>
+</ol>
+<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="n">path</span> <span class="o">=</span> <span
class="s2">"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/example-crs/files/example-crs_vermont-utm.fgb"</span>
+<span class="n">gdf</span> <span class="o">=</span> <span
class="n">gpd</span><span class="o">.</span><span
class="n">read_file</span><span class="p">(</span><span
class="n">path</span><span class="p">)</span>
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span class="n">vermont</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>
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span
class="n">vermont</span><span class="o">.</span><span class="n">schema</span>
+</code></pre></div>
+<div class="codehilite"><pre><span></span><code>SedonaSchema with 1 field:
+ geometry: wkb <epsg:32618>
</code></pre></div>
-<h2 id="manually-create-sedonadb-dataframes">Manually create SedonaDB
DataFrames<a class="headerlink" href="#manually-create-sedonadb-dataframes"
title="Permanent link">¶</a></h2>
-<p>Let's create a DataFrame with one string column and one geometry column to
show some of the functionality of the SedonaDB Python interface.</p>
-<div class="highlight"><pre><span></span><code><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 * FROM (VALUES</span>
-<span class="s2"> ('one', ST_GeomFromWkt('POINT(1 2)')),</span>
-<span class="s2"> ('two', ST_GeomFromWkt('POLYGON((-74.0 40.7, -74.0 40.8,
-73.9 40.8, -73.9 40.7, -74.0 40.7))')),</span>
-<span class="s2"> ('three', ST_GeomFromWkt('LINESTRING(-74.0060 40.7128,
-73.9352 40.7306, -73.8561 40.8484)')))</span>
-<span class="s2">AS t(val, point)"""</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><span
class="n">buildings</span> <span class="o">=</span> <span
class="n">sd</span><span class="o">.</span><span
class="n">read_parquet</span><span class="p">(</span>
+ <span
class="s2">"https://github.com/geoarrow/geoarrow-data/releases/download/v0.2.0/microsoft-buildings_point_geo.parquet"</span>
+<span class="p">)</span>
+</code></pre></div>
+<div class="highlight"><pre><span></span><code><span
class="n">buildings</span><span class="o">.</span><span
class="n">show</span><span class="p">(</span><span class="mi">3</span><span
class="p">)</span>
+</code></pre></div>
+<div
class="codehilite"><pre><span></span><code>┌─────────────────────────────────┐
+│ geometry │
+│ geometry │
+╞═════════════════════════════════╡
+│ POINT(-77.10109681 42.53495524) │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ POINT(-77.10048552 42.53695011) │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
+│ POINT(-77.10096508 42.53681338) │
+└─────────────────────────────────┘
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span class="n">df</span><span
class="o">.</span><span class="n">show</span><span class="p">()</span>
+
+<div class="highlight"><pre><span></span><code><span
class="n">buildings</span><span class="o">.</span><span class="n">schema</span>
</code></pre></div>
-<div
class="codehilite"><pre><span></span><code>┌───────┬──────────────────────────────────────────────────────────────────────────────────────────┐
-│ val ┆ point
│
-│ utf8 ┆ binary
│
-╞═══════╪══════════════════════════════════════════════════════════════════════════════════════════╡
-│ one ┆ 0101000000000000000000f03f0000000000000040
│
-├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ two ┆
0103000000010000000500000000000000008052c09a9999999959444000000000008052c06666666666664…
│
-├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ three ┆
010200000003000000aaf1d24d628052c05e4bc8073d5b444007ce1951da7b52c0933a014d845d4440c286a…
│
-└───────┴──────────────────────────────────────────────────────────────────────────────────────────┘
+<div class="codehilite"><pre><span></span><code>SedonaSchema with 1 field:
+ geometry: wkb_view <ogc:crs84>
</code></pre></div>
-<p>Verify that this object is a SedonaDB DataFrame.</p>
-<div class="highlight"><pre><span></span><code><span
class="nb">type</span><span class="p">(</span><span class="n">df</span><span
class="p">)</span>
+<div class="highlight"><pre><span></span><code><span
class="n">buildings</span><span class="o">.</span><span
class="n">count</span><span class="p">()</span>
</code></pre></div>
-<div class="codehilite"><pre><span></span><code>sedonadb.dataframe.DataFrame
+<div class="codehilite"><pre><span></span><code><span
class="mf">129735970</span>
</code></pre></div>
-<p>Expose the DataFrame as a view and run a SQL operation on the geometry
data.</p>
-<div class="highlight"><pre><span></span><code><span class="n">df</span><span
class="o">.</span><span class="n">to_view</span><span class="p">(</span><span
class="s2">"fun_table"</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><span
class="n">buildings</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"buildings"</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">vermont</span><span class="o">.</span><span
class="n">to_view</span><span class="p">(</span><span
class="s2">"vermont"</span><span class="p">,</span> <span
class="n">overwrite</span><span class="o">=</span><span
class="kc">True</span><span class="p">)</span>
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span class="n">sd</span><span
class="o">.</span><span class="n">sql</span><span class="p">(</span><span
class="s2">"DESCRIBE fun_table"</span><span class="p">)</span><span
class="o">.</span><span class="n">show</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><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 count(*) from buildings</span>
+<span class="s2">join vermont</span>
+<span class="s2">where ST_Intersects(buildings.geometry,
vermont.geometry)</span>
+<span class="s2">"""</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><span
class="err">┌─────────────┬───────────┬─────────────┐</span>
-<span class="err">│</span><span class="w"> </span><span
class="nx">column_name</span><span class="w"> </span><span
class="err">┆</span><span class="w"> </span><span
class="nx">data_type</span><span class="w"> </span><span
class="err">┆</span><span class="w"> </span><span
class="nx">is_nullable</span><span class="w"> </span><span class="err">│</span>
-<span class="err">│</span><span class="w"> </span><span
class="nx">utf8</span><span class="w"> </span><span
class="err">┆</span><span class="w"> </span><span
class="nx">utf8</span><span class="w"> </span><span class="err">┆</span><span
class="w"> </span><span class="nx">utf8</span><span class="w">
</span><span class="err">│</span>
-<span class="err">╞═════════════╪═══════════╪═════════════╡</span>
-<span class="err">│</span><span class="w"> </span><span
class="nx">val</span><span class="w"> </span><span
class="err">┆</span><span class="w"> </span><span class="nx">Utf8</span><span
class="w"> </span><span class="err">┆</span><span class="w"> </span><span
class="nx">YES</span><span class="w"> </span><span class="err">│</span>
-<span class="err">├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤</span>
-<span class="err">│</span><span class="w"> </span><span
class="nx">point</span><span class="w"> </span><span
class="err">┆</span><span class="w"> </span><span class="nx">Binary</span><span
class="w"> </span><span class="err">┆</span><span class="w"> </span><span
class="nx">YES</span><span class="w"> </span><span class="err">│</span>
-<span class="err">└─────────────┴───────────┴─────────────┘</span>
+<div class="codehilite"><pre><span></span><code><span
class="o">---------------------------------------------------------------------------</span>
+
+<span class="nx">SedonaError</span><span class="w">
</span><span class="nx">Traceback</span><span class="w"> </span><span
class="p">(</span><span class="nx">most</span><span class="w"> </span><span
class="nx">recent</span><span class="w"> </span><span
class="nx">call</span><span class="w"> </span><span class="nx">last</span><span
class="p">)</span>
+
+<span class="nx">Cell</span><span class="w"> </span><span
class="nx">In</span><span class="p">[</span><span class="mi">12</span><span
class="p">],</span><span class="w"> </span><span class="nx">line</span><span
class="w"> </span><span class="mi">5</span>
+<span class="w"> </span><span class="mi">1</span><span class="w">
</span><span class="nx">sd</span><span class="p">.</span><span
class="nx">sql</span><span class="p">(</span><span class="s">"""</span>
+<span class="s"> 2 select count(*) from buildings</span>
+<span class="s"> 3 join vermont</span>
+<span class="s"> 4 where ST_Intersects(buildings.geometry,
vermont.geometry)</span>
+<span class="s">----> 5 """</span><span class="p">).</span><span
class="nx">show</span><span class="p">()</span>
+
+
+<span class="nx">File</span><span class="w"> </span><span
class="o">/</span><span class="nx">opt</span><span class="o">/</span><span
class="nx">miniconda3</span><span class="o">/</span><span
class="nx">lib</span><span class="o">/</span><span
class="nx">python3</span><span class="m m-Double">.12</span><span
class="o">/</span><span class="nx">site</span><span class="o">-</span><span
class="nx">packages</span><span class="o">/</span><span
class="nx">sedonadb</span><span class="o">/</span><s [...]
+<span class="w"> </span><span class="mi">272</span><span class="w">
</span><span class="s">"""Print the first limit rows to the console</span>
+<span class="s"> 273 </span>
+<span class="s"> 274 Args:</span>
+<span class="s"> (...)</span>
+<span class="s"> 294 </span>
+<span class="s"> 295 """</span>
+<span class="w"> </span><span class="mi">296</span><span class="w">
</span><span class="nx">width</span><span class="w"> </span><span
class="p">=</span><span class="w"> </span><span
class="nx">_out_width</span><span class="p">(</span><span
class="nx">width</span><span class="p">)</span>
+<span class="o">--</span><span class="p">></span><span class="w">
</span><span class="mi">297</span><span class="w"> </span><span
class="nx">print</span><span class="p">(</span><span
class="kp">self</span><span class="p">.</span><span
class="nx">_impl</span><span class="p">.</span><span
class="nx">show</span><span class="p">(</span><span class="kp">self</span><span
class="p">.</span><span class="nx">_ctx</span><span class="p">,</span><span
class="w"> </span><span class="nx">limit</spa [...]
+
+
+<span class="nx">SedonaError</span><span class="p">:</span><span class="w">
</span><span class="nx">type_coercion</span>
+<span class="nx">caused</span><span class="w"> </span><span
class="nx">by</span>
+<span class="nx">Error</span><span class="w"> </span><span
class="nx">during</span><span class="w"> </span><span
class="nx">planning</span><span class="p">:</span><span class="w"> </span><span
class="nx">Mismatched</span><span class="w"> </span><span
class="nx">CRS</span><span class="w"> </span><span
class="nx">arguments</span><span class="p">:</span><span class="w">
</span><span class="nx">ogc</span><span class="p">:</span><span
class="nx">crs84</span><span class="w"> </span><span class [...]
+<span class="nx">Use</span><span class="w"> </span><span
class="nx">ST_Transform</span><span class="p">()</span><span class="w">
</span><span class="k">or</span><span class="w"> </span><span
class="nx">ST_SetSRID</span><span class="p">()</span><span class="w">
</span><span class="nx">to</span><span class="w"> </span><span
class="nx">ensure</span><span class="w"> </span><span
class="nx">arguments</span><span class="w"> </span><span
class="nx">are</span><span class="w"> </span><span class= [...]
</code></pre></div>
-<div class="highlight"><pre><span></span><code><span class="n">sd</span><span
class="o">.</span><span class="n">sql</span><span class="p">(</span><span
class="s2">"SELECT *, ST_Centroid(ST_GeomFromWKB(point)) as centroid from
fun_table"</span><span class="p">)</span><span class="o">.</span><span
class="n">show</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><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 count(*) from buildings</span>
+<span class="s2">join vermont</span>
+<span class="s2">where ST_Intersects(buildings.geometry,
ST_Transform(vermont.geometry, 'EPSG:4326'))</span>
+<span class="s2">"""</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>┌───────┬─────────────────────────────────────────────┬────────────────────────────────────────────┐
-│ val ┆ point ┆
centroid │
-│ utf8 ┆ binary ┆
geometry │
-╞═══════╪═════════════════════════════════════════════╪════════════════════════════════════════════╡
-│ one ┆ 0101000000000000000000f03f0000000000000040 ┆ POINT(1 2)
│
-├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ two ┆ 0103000000010000000500000000000000008052c0… ┆ POINT(-73.95 40.75)
│
-├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
-│ three ┆ 010200000003000000aaf1d24d628052c05e4bc807… ┆
POINT(-73.92111155675562 40.7664673976246… │
-└───────┴─────────────────────────────────────────────┴────────────────────────────────────────────┘
+<div class="codehilite"><pre><span></span><code>┌──────────┐
+│ count(*) │
+│ int64 │
+╞══════════╡
+│ 361856 │
+└──────────┘
</code></pre></div>
@@ -1280,7 +1348,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="September 18, 2025 00:36:42
UTC">September 18, 2025 00:36:42</span>
+ <span class="git-revision-date-localized-plugin
git-revision-date-localized-plugin-datetime" title="September 22, 2025 04:01:07
UTC">September 22, 2025 04:01:07</span>
</span>
@@ -1316,7 +1384,7 @@
<nav class="md-footer__inner md-grid" aria-label="Footer">
- <a href=".." class="md-footer__link md-footer__link--prev"
aria-label="Previous: SedonaDB">
+ <a href="../contributors-guide/" class="md-footer__link
md-footer__link--prev" aria-label="Previous: Contributors Guide">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24
24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8
11z"></path></svg>
@@ -1326,20 +1394,20 @@
Previous
</span>
<div class="md-ellipsis">
- SedonaDB
+ Contributors Guide
</div>
</div>
</a>
- <a href="../programming-guide/" class="md-footer__link
md-footer__link--next" aria-label="Next: Working with Vector Data">
+ <a href="../reference/python/" class="md-footer__link
md-footer__link--next" aria-label="Next: Python Functions">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
- Working with Vector Data
+ Python Functions
</div>
</div>
<div class="md-footer__button md-icon">
diff --git a/latest-snapshot/geopandas-interop/index.html
b/latest-snapshot/geopandas-interop/index.html
index fbd8a05..dea9033 100644
--- a/latest-snapshot/geopandas-interop/index.html
+++ b/latest-snapshot/geopandas-interop/index.html
@@ -697,6 +697,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/index.html b/latest-snapshot/index.html
index fa6caf3..eeeb360 100644
--- a/latest-snapshot/index.html
+++ b/latest-snapshot/index.html
@@ -695,6 +695,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/overture-examples/index.html
b/latest-snapshot/overture-examples/index.html
index e458592..fb962f6 100644
--- a/latest-snapshot/overture-examples/index.html
+++ b/latest-snapshot/overture-examples/index.html
@@ -688,6 +688,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/programming-guide/index.html
b/latest-snapshot/programming-guide/index.html
index a778786..85980b0 100644
--- a/latest-snapshot/programming-guide/index.html
+++ b/latest-snapshot/programming-guide/index.html
@@ -736,6 +736,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/quickstart-python/index.html
b/latest-snapshot/quickstart-python/index.html
index ef0a7e0..fc772b3 100644
--- a/latest-snapshot/quickstart-python/index.html
+++ b/latest-snapshot/quickstart-python/index.html
@@ -683,6 +683,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/reference/python/index.html
b/latest-snapshot/reference/python/index.html
index 484dc46..c9138a7 100644
--- a/latest-snapshot/reference/python/index.html
+++ b/latest-snapshot/reference/python/index.html
@@ -10,7 +10,7 @@
<link rel="canonical"
href="https://sedona.apache.org/sedonadb/latest/reference/python/">
- <link rel="prev" href="../../contributors-guide/">
+ <link rel="prev" href="../../crs-examples/">
<link rel="next" href="../sql/">
@@ -625,6 +625,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
@@ -3499,7 +3522,7 @@ DBAPI is experimental.</p>
<nav class="md-footer__inner md-grid" aria-label="Footer">
- <a href="../../contributors-guide/" class="md-footer__link
md-footer__link--prev" aria-label="Previous: Contributors Guide">
+ <a href="../../crs-examples/" class="md-footer__link
md-footer__link--prev" aria-label="Previous: CRS Examples">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24
24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8
11z"></path></svg>
@@ -3509,7 +3532,7 @@ DBAPI is experimental.</p>
Previous
</span>
<div class="md-ellipsis">
- Contributors Guide
+ CRS Examples
</div>
</div>
</a>
diff --git a/latest-snapshot/reference/sql-joins/index.html
b/latest-snapshot/reference/sql-joins/index.html
index 106e1cd..4b9f7ca 100644
--- a/latest-snapshot/reference/sql-joins/index.html
+++ b/latest-snapshot/reference/sql-joins/index.html
@@ -623,6 +623,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/reference/sql/index.html
b/latest-snapshot/reference/sql/index.html
index 5f46cfe..958b88f 100644
--- a/latest-snapshot/reference/sql/index.html
+++ b/latest-snapshot/reference/sql/index.html
@@ -625,6 +625,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/search/search_index.json
b/latest-snapshot/search/search_index.json
index 06652d7..8be3cbe 100644
--- a/latest-snapshot/search/search_index.json
+++ b/latest-snapshot/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introducing
SedonaDB","text":"<p>SedonaDB is a single-node analytical database engine with
geospatial as the first-class citizen.</p> <p>Fast and dependency-free,
SedonaDB is ideal for working with smaller datasets located on local machines
or cloud instances.</p> <p>The initial <code>0.1</code> release supports a core
set of vector operations, with comprehensive vector and ras [...]
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introducing
SedonaDB","text":"<p>SedonaDB is a single-node analytical database engine with
geospatial as the first-class citizen.</p> <p>Fast and dependency-free,
SedonaDB is ideal for working with smaller datasets located on local machines
or cloud instances.</p> <p>The initial <code>0.1</code> release supports a core
set of vector operations, with comprehensive vector and ras [...]
\ No newline at end of file
diff --git a/latest-snapshot/sitemap.xml b/latest-snapshot/sitemap.xml
index 6c4a925..f282627 100644
--- a/latest-snapshot/sitemap.xml
+++ b/latest-snapshot/sitemap.xml
@@ -2,46 +2,50 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://sedona.apache.org/sedonadb/latest/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/contributors-guide/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
+ </url>
+ <url>
+ <loc>https://sedona.apache.org/sedonadb/latest/crs-examples/</loc>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/geopandas-interop/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/overture-examples/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/programming-guide/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/quickstart-python/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/tags/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/working-with-parquet-files/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/reference/python/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/reference/sql-joins/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
<url>
<loc>https://sedona.apache.org/sedonadb/latest/reference/sql/</loc>
- <lastmod>2025-09-21</lastmod>
+ <lastmod>2025-09-22</lastmod>
</url>
</urlset>
\ No newline at end of file
diff --git a/latest-snapshot/sitemap.xml.gz b/latest-snapshot/sitemap.xml.gz
index f28498d..47f6c7a 100644
Binary files a/latest-snapshot/sitemap.xml.gz and
b/latest-snapshot/sitemap.xml.gz differ
diff --git a/latest-snapshot/tags/index.html b/latest-snapshot/tags/index.html
index 73ab498..09212c8 100644
--- a/latest-snapshot/tags/index.html
+++ b/latest-snapshot/tags/index.html
@@ -612,6 +612,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>
diff --git a/latest-snapshot/working-with-parquet-files/index.html
b/latest-snapshot/working-with-parquet-files/index.html
index e929476..409d8b3 100644
--- a/latest-snapshot/working-with-parquet-files/index.html
+++ b/latest-snapshot/working-with-parquet-files/index.html
@@ -688,6 +688,29 @@
+
+
+
+
+
+
+ <li class="md-nav__item">
+ <a href="../crs-examples/" class="md-nav__link">
+
+
+
+ <span class="md-ellipsis">
+ CRS Examples
+
+ </span>
+
+
+ </a>
+ </li>
+
+
+
+
</ul>
</nav>