Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter by polygon #90

Open
dwweb0309 opened this issue Apr 18, 2023 · 1 comment
Open

Filter by polygon #90

dwweb0309 opened this issue Apr 18, 2023 · 1 comment

Comments

@dwweb0309
Copy link

filtersToWhere function is great for filtering but how can we filter points by polygon?

@cosmin-petrescu
Copy link

Hello,

You can achieve this by using some of the PostgreSQL methods:

  1. ST_Contains - ST_Contains(GeomFromText('POLYGON((long1 lat1, long2 lat2, long3 lat3))'), my_geometry_column)
  2. ST_Within - ST_Within(my_geometry_column, GeomFromText('POLYGON((long1 lat1, long2 lat2, long3 lat3))'))

You just need to return them within filtersToWhere result.

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

No branches or pull requests

2 participants