jiayuasu opened a new pull request, #132:
URL: https://github.com/apache/sedona-spatialbench/pull/132
Q3 filters trips against this ring:
```
POLYGON((-111.9060 34.7347, -111.6160 34.7347, -111.6160 35.0047, -111.9060
35.0047, -111.9060 34.7347))
```
Everywhere it appears, it is described as a **"10km bounding box"** which,
with the 0.045° buffer, gives a **"15km radius"**. Neither figure is right.
The ring spans 0.290° of longitude by 0.270° of latitude. At its centre
latitude (34.8697 °N, which is exactly the Sedona centre the other queries use):
| | |
|---|---|
| Longitude | 0.290° × 111.32 km × cos(34.87°) ≈ **26.5 km** east–west |
| Latitude | 0.270° × 110.94 km ≈ **30.0 km** north–south |
| From the centre | 13.2 km E–W, 15.0 km N–S |
| Corners | √(13.2² + 15.0²) ≈ **20.0 km**, or 25.0 km once the buffer is
added |
So the "10km box" label understates the region by about 3×, and the query
reaches ~25 km from the centre rather than 15 km.
## What changes
Comments and prose only. **The polygon literal, the thresholds and the
result sets are untouched**, so the committed ground-truth answers still apply
and nothing needs regenerating.
- `spatialbench-queries/print_queries.py` — the SQL source of truth: the `--
Q3:` header and the inline polygon comment
-
`spatialbench-queries/{geopandas_queries,spatial_polars,pycanopy_queries}.py` —
the three dataframe implementations repeat the claim in their Q3 docstrings
- `notebooks/queries.ipynb` — the source of the rendered page
- `docs/queries.md`, `docs/queries.zh.md` — heading and prose, kept in sync
with the notebook
The buffer's existing `~5km` annotation for 0.045° is deliberately left
alone. It is accurate in latitude (0.045° ≈ 5.0 km) and follows the same
degree-to-kilometre convention the rest of the geometry suite uses for `0.45`
"= 50 km" and `0.0045` "≈ 500 m" — revisiting that convention is a separate
discussion, and it is the reason the geography suite in #131 exists.
Found while writing the geography counterpart of this query in #131, where
the same label had been carried over.
## Verification
```bash
python3 spatialbench-queries/print_queries.py SedonaDB # 12 queries, SQL
unchanged
mkdocs build --strict
```
`git diff` is 13 lines across 7 files; the notebook round-trips with only
the two intended strings changed, and `docs/queries.md` is verified still in
sync with the notebook's Q3 cell.
--
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]