Skip to content

Filter for locations in a geofence#210

Merged
elffjs merged 12 commits intomainfrom
pr-3897-filter-locations-in-geofence
Sep 12, 2025
Merged

Filter for locations in a geofence#210
elffjs merged 12 commits intomainfrom
pr-3897-filter-locations-in-geofence

Conversation

@elffjs
Copy link
Copy Markdown
Member

@elffjs elffjs commented Sep 10, 2025

Add in two new filters for values being fed into aggregations of Location-valued fields:

inPolygon: [{latitude: 37.32, longitude: 122.02}, …]

and

inCircle: {center: {latitude: 37.32, longitude: 122.02}, radius: 700}

Loose ends:

  • I do not expect good results from the polygon filter for locations near the edges of the coordinate system.
  • I have not tested out what happens when a polygon is not properly oriented, or if it has self-intersections.
  • Need to add HDOP filtering. Maybe a separate PR.

@linear
Copy link
Copy Markdown

linear Bot commented Sep 10, 2025

@elffjs elffjs changed the title Try it Location in geofence filter Sep 10, 2025
@elffjs elffjs changed the title Location in geofence filter Filter for locations in a geofence Sep 10, 2025
@elffjs elffjs marked this pull request as ready for review September 12, 2025 13:48
@elffjs elffjs merged commit 21c7540 into main Sep 12, 2025
4 checks passed
@elffjs elffjs deleted the pr-3897-filter-locations-in-geofence branch September 12, 2025 14:15
@elffjs elffjs mentioned this pull request Feb 25, 2026
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.

2 participants