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

Allow filtering by geo boundaries #390

Open
heshan0131 opened this issue Feb 28, 2019 · 6 comments
Open

Allow filtering by geo boundaries #390

heshan0131 opened this issue Feb 28, 2019 · 6 comments
Assignees
Labels

Comments

@heshan0131
Copy link
Contributor

  • Allow an option to ‘filter points by polygon’ in point layer, select polygons inside a Geojson layer or a polygon drew by the user to filter by.

  • Use turf.js to filter points inside or outside of the selected polygon.

  • Allow an option to filter arcs/lines by whether it begins or end inside the polygon.

@macrigiuseppe
Copy link
Collaborator

macrigiuseppe commented Jul 30, 2019

@heshan0131 I am looking at turf.js, should we use:

or are there another methods we should use?

@macrigiuseppe
Copy link
Collaborator

The new polygon filter will be treated as a regular filter and added to Filters in vis-state. Because the each new polygon filter will required to be mapped against an existing layer, we need to properly create a connection between a filter and layer.

  • We are going to add a new property layerId in Filter to track connection between polygon filter and layers.
  • We need to modify filterData in order to apply the new filters.
  • The current dataset will be filtered based on the polygon filter layer properties (shape and and layer columns)

@seanosterday
Copy link

@macrigiuseppe I can see that the filter by drawn polygon works but was the filter by a geojson layer ever implemented? I am not seeing this in the demo app.

@maxwell-oroark
Copy link

maxwell-oroark commented Mar 16, 2021

+1 to @seanosterday's comment. It is unclear what I can presently accomplish with the draw tool in the demo app. I created a shape and added a data layer to the "Geo" filter but when I go to export "filtered data" the # of rows in the dataset are exactly the same, regardless of how restrictive my polygon is

@macrigiuseppe
Copy link
Collaborator

@macrigiuseppe I can see that the filter by drawn polygon works but was the filter by a geojson layer ever implemented? I am not seeing this in the demo app.

@seanosterday we currently don't support filter by geojson layer

@macrigiuseppe
Copy link
Collaborator

export "filtered dat

@maxwell-oroark i have tried the export functionality after filtering points using the draw tool and it works. See below:

Screen Shot 2021-03-19 at 4 58 20 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants