jiayuasu commented on PR #2900:
URL: https://github.com/apache/sedona/pull/2900#issuecomment-4372144784

   Pushed `d1d895db58`.
   
   | Review point | Action |
   |---|---|
   | Per-row `RS_ZonalStats('mean')` over `buildings × composite` produces 
per-tile means and silently wrong scores when composite has more than one tile 
| Restructured to a two-step aggregation: per `(building, tile)` 
`RS_ZonalStats(rast, geom, 'sum')` and `'count'` gated by `RS_Intersects`, then 
`SUM(tile_sum) / SUM(tile_cnt)` per building. Pixel-count-weighted, 
multi-tile-correct, single-tile result identical to the prior version. |
   | `buildings × roads` cartesian for nearest-road won't scale to county OSM | 
Replaced with `JOIN roads ON ST_KNN(b.geom, r.geom, 1, false)` — indexed 
nearest-neighbour join, returns one row per building with the actual 
`ST_DistanceSpheroid` computed alongside. |
   | Synthetic geometries had SRID 0, so the GeoParquet 1.1 writer wouldn't 
auto-populate projjson | Wrapped every `ST_GeomFromText(...)` with 
`ST_SetSRID(..., 4326)` so the writer can derive projjson CRS metadata as the 
section prose claims. |
   | Intro requirement note pointed at `ST_Transform`, which the notebook never 
calls | Reattributed to the actual 1.9-only features the notebook uses: the 
auto-tiling raster reader (GH-2672) and the GeoParquet 1.1 writer's 
auto-populated covering-bbox + projjson CRS (GH-2646, GH-2664). |
   
   Re-verified end-to-end through the local mirror of 
`docker/test-notebooks.sh` after the changes:
   
   ```
   PASS  03-fire-risk-fusion  18s elapsed
   ```
   
   Ranking unchanged (B33 top with `risk_score=1.7543`, B00 bottom with 
`0.2488`) — the new SQL is mathematically equivalent to the old one for 
single-tile inputs but now stays correct under scaling.


-- 
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]

Reply via email to