Skip to content

Include points that lie on the getClusters bbox edge - #264

Open
SashaMIT wants to merge 1 commit into
mapbox:mainfrom
SashaMIT:codered-bbox-edge
Open

SashaMIT wants to merge 1 commit into
mapbox:mainfrom
SashaMIT:codered-bbox-edge

Conversation

@SashaMIT

Copy link
Copy Markdown

Summary

  • getClusters stores coordinates as Int32 truncations of encode(), then queried with the untruncated value. The southwest and northeast corners of the box were left out.
  • The query bounds are truncated the same way. A point at -124, 43 is still left out. The corners of a unit square still all come back.

Test plan

  • New test: southwest -123.245515, 43.9150233333333 and northeast -123.192528333333, 44.0307166666667 are returned, and -124, 43 is not
  • npm test 19 passed

Made with Cursor

Stored coordinates are Int32 truncations of encode(). The query used the untruncated value, so a point on the box edge fell just outside.
@SashaMIT
SashaMIT requested a review from a team as a code owner September 27, 2026 09:58
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