Introduce shorthand syntax for points & bboxes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 259
- Forks
- 168
- Avg merge
- 6h 15m
- Merged PRs (30d)
- 1
Description
I've reached a point of extreme frustration when debugging queries with our geometry syntax.
Passing four complete parameters for viewports & rectangles, when there are common vernaculars for them as specified in GeoJSON&WKT makes it extremely hard to read.
But even worse makes me think it may lead to mistakes. Get a GeoJSON document back, it defaults to (lon,lat), something the user NEEDS to know in our model, but something they can pass along if they just pass along the tuple. Same with boundary.viewport.min_lon, boundary.viewport.min_lat, boundary.viewport.max_lat, boundary.viewport.max_lon.
That could simply be expressed as boundary.viewport=[x1,y1,x2,y2], which while less visibly expressive is much faster to port from one context to the next and spot check.
I think it's important that we keep the grammar for full expression in there, but there is no reason why we cannot offer boundary.viewport, boundary.rect, and focus.point as explicit, clearly defined and standardized offerings, for the user who knows what they're looking for.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by tracing the existing geometry query grammar and the handling of boundary.viewport, boundary.rect, and focus.point. Define and implement the standardized shorthand while retaining the full expression grammar, then verify the coordinate ordering and shorthand behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100