Skip to content

Add support for poly hit testing to Patches and greedy mode #13277

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

Merged
merged 11 commits into from
Sep 19, 2023

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Jul 21, 2023

This PR adds support for poly hit testing to Patches and MultiPolygons. It also makes hit testing procedures to use spatial index where they previously didn't and generally refactors/modernizes hit testing code.

Screencast_00001.mp4

fixes #2325

@mattpap mattpap added this to the 3.3 milestone Jul 21, 2023
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #13277 (1adaa99) into branch-3.3 (3d1ecd1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           branch-3.3   #13277   +/-   ##
===========================================
  Coverage       92.43%   92.43%           
===========================================
  Files             316      316           
  Lines           20218    20221    +3     
===========================================
+ Hits            18688    18691    +3     
  Misses           1530     1530           

@mattpap
Copy link
Contributor Author

mattpap commented Jul 24, 2023

I inverted the meaning of greedy selection, to match the proposal in issue #2325 (the screencast is not updated).

@mattpap mattpap changed the title Add support for poly hit testing to Patches and non-greedy mode Add support for poly hit testing to Patches and greedy mode Jul 24, 2023
@mattpap mattpap force-pushed the mattpap/2325_Patches_poly_hit_test branch from 6d4345e to ad98e6c Compare September 12, 2023 10:13
@mattpap mattpap force-pushed the mattpap/2325_Patches_poly_hit_test branch from ad98e6c to 1adaa99 Compare September 15, 2023 18:39
Copy link
Member

@ianthomas23 ianthomas23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example is really nice!

@mattpap mattpap merged commit 080cc10 into branch-3.3 Sep 19, 2023
@mattpap mattpap deleted the mattpap/2325_Patches_poly_hit_test branch September 19, 2023 10:21
Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
…13277)

* Add poly hit testing to Patches glyph

* Add support for non-greedy region selection

* Implement Patches._hit_rect in terms of _hit_poly

* Invert the meaning of greedy selection

* Use spatial index in MarkerView._hit_poly()

* Use minmax2(xs, ys) instead of minmax(xs) and minmax(ys)

* Add support for MultiPolygons._hit_poly and greedy selections

* Increase timeout in devtools' server

* Add release notes

* Use ndarrays for lats and lons in us_{counties,states}.py

* Add unit tests
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lasso select not working on patches
2 participants