Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 78 additions & 44 deletions docs/source/user_guide/classification.ipynb

Large diffs are not rendered by default.

101 changes: 64 additions & 37 deletions docs/source/user_guide/focal.ipynb

Large diffs are not rendered by default.

141 changes: 109 additions & 32 deletions docs/source/user_guide/local.ipynb

Large diffs are not rendered by default.

719 changes: 458 additions & 261 deletions docs/source/user_guide/multispectral.ipynb

Large diffs are not rendered by default.

72 changes: 50 additions & 22 deletions docs/source/user_guide/pathfinding.ipynb

Large diffs are not rendered by default.

167 changes: 115 additions & 52 deletions docs/source/user_guide/proximity.ipynb

Large diffs are not rendered by default.

296 changes: 186 additions & 110 deletions docs/source/user_guide/surface.ipynb

Large diffs are not rendered by default.

110 changes: 72 additions & 38 deletions docs/source/user_guide/zonal.ipynb

Large diffs are not rendered by default.

30 changes: 23 additions & 7 deletions examples/cloudless-mosaic-sentinel2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"from datashader import Canvas\n",
"\n",
"import stackstac\n",
"from satsearch import Search\n",
"import pystac_client\n",
"\n",
"import xrspatial.multispectral as ms"
]
Expand Down Expand Up @@ -74,14 +74,16 @@
"metadata": {},
"outputs": [],
"source": [
"items = Search(\n",
" url='https://earth-search.aws.element84.com/v0',\n",
"catalog = pystac_client.Client.open('https://earth-search.aws.element84.com/v1')\n",
"\n",
"search = catalog.search(\n",
" bbox=[-96.185642, 28.569157, -95.117574, 29.500710],\n",
" collections=['sentinel-s2-l2a-cogs'],\n",
" collections=['sentinel-2-l2a'],\n",
" query={'eo:cloud_cover': {'lt': 25}},\n",
" datetime='2019-07-01/2020-06-30'\n",
").items()\n",
")\n",
"\n",
"items = search.item_collection()\n",
"len(items)"
]
},
Expand All @@ -102,7 +104,7 @@
"outputs": [],
"source": [
"stack_ds = stackstac.stack(\n",
" items, epsg=32613, resolution=100, assets=['B04', 'B03', 'B02'], chunksize=4096\n",
" items, epsg=32613, resolution=100, assets=['red', 'green', 'blue'], chunksize=4096\n",
")\n",
"\n",
"stack_ds"
Expand Down Expand Up @@ -216,8 +218,22 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.2"
}
},
"nbformat": 4,
Expand Down
38 changes: 34 additions & 4 deletions examples/housing_price_feature_engineering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T14:26:33.627412Z",
"iopub.status.busy": "2026-01-23T14:26:33.627252Z",
"iopub.status.idle": "2026-01-23T14:26:34.752109Z",
"shell.execute_reply": "2026-01-23T14:26:34.751375Z"
}
},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -65,7 +72,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T14:26:34.754220Z",
"iopub.status.busy": "2026-01-23T14:26:34.753759Z",
"iopub.status.idle": "2026-01-23T14:26:34.757293Z",
"shell.execute_reply": "2026-01-23T14:26:34.756767Z"
}
},
"outputs": [],
"source": [
"# assume the data contain lat lon coords with some additional values\n",
Expand Down Expand Up @@ -164,7 +178,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T14:26:34.758688Z",
"iopub.status.busy": "2026-01-23T14:26:34.758576Z",
"iopub.status.idle": "2026-01-23T14:26:36.327629Z",
"shell.execute_reply": "2026-01-23T14:26:36.327038Z"
}
},
"outputs": [],
"source": [
"# bounding box of the raster\n",
Expand Down Expand Up @@ -256,7 +277,16 @@
],
"metadata": {
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.2"
}
},
"nbformat": 4,
Expand Down
16 changes: 15 additions & 1 deletion examples/user_guide/0_Getting_Setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,22 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.2"
}
},
"nbformat": 4,
Expand Down
119 changes: 106 additions & 13 deletions examples/user_guide/1_Surface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:45.076389Z",
"iopub.status.busy": "2026-01-23T01:05:45.076296Z",
"iopub.status.idle": "2026-01-23T01:05:46.721799Z",
"shell.execute_reply": "2026-01-23T01:05:46.721260Z"
}
},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -74,7 +81,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:46.723464Z",
"iopub.status.busy": "2026-01-23T01:05:46.723116Z",
"iopub.status.idle": "2026-01-23T01:05:48.556884Z",
"shell.execute_reply": "2026-01-23T01:05:48.556368Z"
}
},
"outputs": [],
"source": [
"from xrspatial import generate_terrain\n",
Expand All @@ -98,7 +112,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:48.575684Z",
"iopub.status.busy": "2026-01-23T01:05:48.575535Z",
"iopub.status.idle": "2026-01-23T01:05:48.650480Z",
"shell.execute_reply": "2026-01-23T01:05:48.649590Z"
}
},
"outputs": [],
"source": [
"shade(terrain, cmap=Elevation, how='linear')"
Expand All @@ -118,7 +139,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:48.651901Z",
"iopub.status.busy": "2026-01-23T01:05:48.651797Z",
"iopub.status.idle": "2026-01-23T01:05:48.740838Z",
"shell.execute_reply": "2026-01-23T01:05:48.739814Z"
}
},
"outputs": [],
"source": [
"from xrspatial import hillshade\n",
Expand All @@ -141,7 +169,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:48.743794Z",
"iopub.status.busy": "2026-01-23T01:05:48.743688Z",
"iopub.status.idle": "2026-01-23T01:05:49.799432Z",
"shell.execute_reply": "2026-01-23T01:05:49.798753Z"
}
},
"outputs": [],
"source": [
"terrain_elevation = shade(terrain, cmap=Elevation, alpha=128, how='linear')\n",
Expand All @@ -164,7 +199,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:49.803468Z",
"iopub.status.busy": "2026-01-23T01:05:49.803343Z",
"iopub.status.idle": "2026-01-23T01:05:50.071899Z",
"shell.execute_reply": "2026-01-23T01:05:50.071154Z"
}
},
"outputs": [],
"source": [
"from xrspatial import slope\n",
Expand Down Expand Up @@ -197,7 +239,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:50.076050Z",
"iopub.status.busy": "2026-01-23T01:05:50.075898Z",
"iopub.status.idle": "2026-01-23T01:05:51.201913Z",
"shell.execute_reply": "2026-01-23T01:05:51.201329Z"
}
},
"outputs": [],
"source": [
"from xrspatial import curvature\n",
Expand Down Expand Up @@ -232,7 +281,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:51.206172Z",
"iopub.status.busy": "2026-01-23T01:05:51.206076Z",
"iopub.status.idle": "2026-01-23T01:05:51.433035Z",
"shell.execute_reply": "2026-01-23T01:05:51.432339Z"
}
},
"outputs": [],
"source": [
"from xrspatial import aspect\n",
Expand Down Expand Up @@ -272,7 +328,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:51.435698Z",
"iopub.status.busy": "2026-01-23T01:05:51.435594Z",
"iopub.status.idle": "2026-01-23T01:05:52.080003Z",
"shell.execute_reply": "2026-01-23T01:05:52.079158Z"
}
},
"outputs": [],
"source": [
"from xrspatial import viewshed\n",
Expand Down Expand Up @@ -315,7 +378,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:52.081235Z",
"iopub.status.busy": "2026-01-23T01:05:52.081121Z",
"iopub.status.idle": "2026-01-23T01:05:58.440849Z",
"shell.execute_reply": "2026-01-23T01:05:58.440147Z"
}
},
"outputs": [],
"source": [
"# Will take some time to run...\n",
Expand Down Expand Up @@ -347,7 +417,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:58.442088Z",
"iopub.status.busy": "2026-01-23T01:05:58.441989Z",
"iopub.status.idle": "2026-01-23T01:05:59.426418Z",
"shell.execute_reply": "2026-01-23T01:05:59.425836Z"
}
},
"outputs": [],
"source": [
"from xrspatial import viewshed\n",
Expand Down Expand Up @@ -385,7 +462,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-23T01:05:59.430189Z",
"iopub.status.busy": "2026-01-23T01:05:59.430076Z",
"iopub.status.idle": "2026-01-23T01:05:59.992006Z",
"shell.execute_reply": "2026-01-23T01:05:59.991256Z"
}
},
"outputs": [],
"source": [
"%time view = viewshed(terrain, x=OBSERVER_X, y=OBSERVER_Y, observer_elev=100)\n",
Expand Down Expand Up @@ -421,7 +505,16 @@
],
"metadata": {
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.2"
}
},
"nbformat": 4,
Expand Down
Loading