jiayuasu opened a new pull request, #2954:
URL: https://github.com/apache/sedona/pull/2954
## Summary
Closes #2804.
Rewrites `docs/tutorial/raster.md` (and the Chinese mirror `raster.zh.md`)
to follow a single dataset through the full raster pipeline, with a visual at
every step.
The walkthrough uses a synthesized 2-band GeoTIFF (red + NIR) — fully
reproducible, no new bytes committed — and carries it through eight steps:
1. **Create** the scene (numpy + rasterio synthesis)
2. **Load** with the `raster` data source
3. **Inspect** metadata (`RS_Width`, `RS_Height`, `RS_NumBands`, `RS_SRID`,
`RS_GeoReference`, `RS_MetaData`)
4. **Visualize** the raw bands
5. **Process** — NDVI via `RS_MapAlgebra`
6. **Visualize** the NDVI result
7. **Aggregate** to vector zones with `RS_ZonalStats` over 5 irregular
parcel polygons
8. **Save** to disk with `RS_AsGeoTiff` + the `raster` writer
### Visuals (13 total in the page)
New assets under `docs/image/raster-tutorial/`:
- 7 PNGs rendered from numpy + real test resources (`FAA_UTM18N_NAD83.tif`,
`raster/test1.tiff`) — pipeline overview, raw red/NIR bands, NDVI result,
zonal-stats panel, map-algebra detail, and two real-raster examples
- 3 hand-authored SVG diagrams — tiling flow, NDVI map-algebra detail,
two-step write pipeline
Reuses existing SVGs (`Raster_Affine_Transformation`,
`RS_WorldToRasterCoord`, `RS_ReprojectMatch`, `rasterized-image`) in the
reference sections.
### Reference content preserved
Everything that was reference-shaped in the old tutorial (non-GeoTIFF
formats, every operator grouped by purpose, Python `SedonaRaster` workflows,
UDFs, performance pointer) is kept below the walkthrough so the page still
works as a lookup reference.
### Chinese mirror
`docs/tutorial/raster.zh.md` is a full translation of the new structure. The
four reference-section headers use explicit `{#anchor}` IDs (wrapped in `{% raw
%}` because the mkdocs-macros plugin would otherwise parse `{#...}` as a Jinja
comment — same idiom used in
`docs/api/sql/Spatial-Statistics/ST_*DistanceBandColumn.md`).
### Build status
`mkdocs build --strict`-equivalent pass: no errors or warnings on either
`raster.md` or `raster.zh.md`. All 38 relative links and 13 image paths resolve.
Follow-up to #2769 / #2802.
## Test plan
- [ ] CI doc build passes
- [ ] Spot-check rendered English page in CI artifact / preview
- [ ] Spot-check rendered Chinese page in CI artifact / preview
- [ ] Verify the synthesized-scene code block (step 1) runs as documented
when copy-pasted into a notebook with `rasterio` installed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]