I have to find on which level my calculations will be made based on the distance between objects in meters, suppose the method will look something like:
def get_cell_level(average_edge_length: int) -> int:
level = (???)
return level
The goal is to use methods from the s2sphere
Python library as to avoid copying this table S2 Cell Statistics to some sort of look-up table.
Unfortunately, i was not able to find the solution myself 🙁
I’ve tried using the LengthMetric class from the s2sphere library. Tried get_closest_level
method, but was confused how to translate meters to some sort of metric of the s2 unit sphere, given I dont’t have any input data besides average_edge_length