Skip to content

[DOCS] Add blog post: raster Python UDFs in 1.9.1 - #3261

Merged
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:blog/raster-python-udfs
Aug 14, 2026
Merged

[DOCS] Add blog post: raster Python UDFs in 1.9.1#3261
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:blog/raster-python-udfs

Conversation

@jiayuasu

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

  • No: this is a documentation update. The PR name follows the format [DOCS] my subject

What changes were proposed in this PR?

Add a blog post about the raster Python UDFs shipped in Sedona 1.9.1: "Seven Lines of NumPy, 121 Million Pixels".

The post walks through computing NDVI over a Sentinel-2 scene of California's Central Valley end to end: reading the red and NIR band COGs from the public sentinel-cogs bucket with the tiled raster reader (512 px tiles), pairing the bands with a join on tile position, computing NDVI in a two-raster Python UDF that returns a raster via with_bands(), and writing the result back as Cloud Optimized GeoTIFFs with RS_AsCOG and the raster writer. It also covers using rasterio/SciPy inside UDFs, NODATA handling, the same-grid boundary, and how the workload distributes. Cross-links the tiled reader, STAC, and raster metadata posts.

Includes a cover image (five real NDVI output tiles from the run plus the UDF code) and a before/after figure, both generated from the actual outputs.

How was this patch tested?

  • Every code snippet in the post was executed against the released artifacts: a fresh venv with pip install apache-sedona==1.9.1 and sedona-spark-shaded-3.5_2.12:1.9.1 / geotools-wrapper:1.9.1-33.5 / hadoop-aws:3.3.4 from Maven Central, reading s3a://sentinel-cogs anonymously.
  • All numbers in the post (484 tiles per band, 76 s end-to-end, NDVI ranges) are the measured output of those runs; the written tiles were read back with the raster reader and checked with RS_BandNoDataValue / RS_SummaryStatsAll, and verified to be internally tiled with overviews and deflate compression.
  • Both images are rendered from the run's real outputs.
  • pre-commit passes, including the manual-stage oxipng hook on both PNGs (idempotent on second run).
  • Verified the rendered page with mkdocs serve: images resolve, code highlighting works, and the blog star-CTA hook is appended.

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation.

@jiayuasu
jiayuasu marked this pull request as ready for review August 14, 2026 08:45
@jiayuasu
jiayuasu merged commit ff49b1c into apache:master Aug 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant