-
Notifications
You must be signed in to change notification settings - Fork 28
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
Select data by bounding box #148
Comments
The idea here is to let the user draw a box on the screen and select items from their visualization. The items may either be highlighted on the JS side in the map or, also, the row indexes can be sent back from JS to Python so that the user can call The predominant question is: how do you draw a bounding box in deck.gl? Option 1: "Manual" approach Deck has a Option 2: Nebula.gl nebula.gl is a library that works with deck.gl to enable editing of geospatial data. In theory, this should solve the problem for us using its SelectionLayer, but the library seems to be no longer maintained. Once we have the data from |
Some related findings discussions we had today. For 'Drawing-bbox' UI partExisting options - Nebula.glAs mentioned, Nebula.gl seems to be not maintained anymore. Use react-map-gl-drawI was hoping we could use react-map-gl-draw plugin with ReactMapGL's We discussed using the DeckGL layer as a MapboxOverlay, which will give a better integration with other Mapbox controls. Considering this will change how all the layers will work internally, it seems not worth the risk. For passing the data to layer part
Lines 68 to 73 in 96611f5
|
@kylebarron and I started hacking on this a bit when we met last week, many thanks to @isaacbrodsky for the initial PR that was a great starting point. This is the PR where I've been working: #417 Here's a screen recording of what the interaction looks like currently: BboxScreengrab.mp4The bit to get working is passing the selected indexes back to Python, but that should be reasonably straightforward. And the code needs a bunch of cleanups. It would also be nice to get some design help :) Seeing how complex this could get in the future (do we support drawing arbitrary polygons, etc) - @kylebarron, am wondering how this code should be structured -- I'll leave further comments on the PR. |
A user draws a bounding box to select an array of feature indices that fall within the bounding box. The features are highlighted on the map and selected in the geodataframe.
Useful for exploratory data analysis.
Kyle to add details.
The text was updated successfully, but these errors were encountered: