[feat] GPU filter and brush for GeoJson layer #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a previous pull request #3, the use of a spatial index reduced the time required to query the geometries within the selection polygon to only 3 to 4 milliseconds over ~1 million polygons. When the selection polygon is moved, geometries that fall within the polygon should be highlighted, and geometries that fall outside the polygon should be hidden. This process is also known as brushing.
Brushing the geometries in a GeoJsonLayer should be a straightforward process of hiding geometries that have not been selected. Since all the vertices of geometries have already been loaded in GPU, there should be a fast way to implement brushing in a GeoJson layer.
This PR is trying to add a new Deck.gl Layer extension to brush geojson layer
Super fast GPU brushing over ~1 million polygons: 🚀
instanceHighlighted
is added to the layer to indicate whether the feature is highlightedgetHighlighted()
is used to get the value of instanceHighlighted based on the search result in GeoJsonlayerPerformance:
deck: Updated attributes for 7314969 instances in azfyr45-polygons-fill in 162ms