spatialdata-plot icon indicating copy to clipboard operation
spatialdata-plot copied to clipboard

(Optional) fast extent computation for large vector data

Open LucaMarconato opened this issue 1 year ago • 0 comments

As long as plotting is concerned, the extent of the data doesn't need to be super precise. The get_extent() function has a parameter exact=True, which could speed up the computation of extents for vector data when set to False.

Specifically, if exact=False, the extent is computed as the transformed extent of the raw data. This is guaranteed to contain all the data points, and usually is not too large of the real extent.

Therefore, for large collections of points (one can set a threshold empirically after some real tests), I would consider to consider setting exact=False to speed up things.

Note: maybe the speed up is negligible compared to the time require to render the data, so I would benchmark before making a decision.

LucaMarconato avatar Oct 09 '23 20:10 LucaMarconato