spatialdata icon indicating copy to clipboard operation
spatialdata copied to clipboard

Extent calculation doesn't account for radius of Points

Open timtreis opened this issue 1 year ago • 1 comments

Just fixed https://github.com/scverse/spatialdata-plot/pull/334 and noticed that the extent calculation does not account for the radius of points. In the first version of this picture we calculated this within spatialdata-plot but that has since moved upstream. It's realistically not super noticeable if these are small, but f.e. in our test case it stands out:

image

Can be mitigated through the pad_extent parameter in sdata.pl.show(), but figured I'd report anyway.

timtreis avatar Aug 28 '24 19:08 timtreis

That's strange; you are using spatialdata.get_extent() right? In the API the radius is taken into account in the extent calculation: https://github.com/scverse/spatialdata/blob/8323e158d76e5ebefb033aa99900294ed1e4668a/src/spatialdata/_core/data_extent.py#L51

LucaMarconato avatar Sep 08 '24 10:09 LucaMarconato