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

Fix default size for points elements #214

Open
LucaMarconato opened this issue Mar 21, 2024 · 0 comments
Open

Fix default size for points elements #214

LucaMarconato opened this issue Mar 21, 2024 · 0 comments

Comments

@LucaMarconato
Copy link
Member

LucaMarconato commented Mar 21, 2024

When points elements are being shown, an optimal size for the points is guessed based on a heuristic implemented in _calc_default_radii().

There are three fixes that we need to make here:

  • get_extent(), even when using exact=False, is too slow when there is a large number of points. We should add a parameter fast: bool = False which computes a very rough approximation of the extent based on some "Montecarlo" sampling.
  • The value in unit we return is wrong when we are in a scaled coordinate system; I think that we need to divide by the average module of the eigenvalues of the affine transformation, as we do in _adjust_radii_of_points_layer()
  • There is a strange bug in get_extent() where the single-dispatch doesn't recognize SpatialData objects. This is tracked here: get_extent() does not recognizes SpatialData in the single dispatch pattern in specific cases spatialdata#500

For the moment, I am disabling the use of _calc_default_radii() in #215.

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

1 participant