In an OpenLayers map I have data of several hundred/thousand buildings. There are also like ~100 other objects on the map which can move. I need to check each 100 ms if a object can see another with a maximum viewrange of say 1000 m.
For the maxviewrange I implemented an OK solution (checking distance only if src or dst moved).
Now I need to check if a line from src to dst intersects with any building. I would create a boundingbox using src and dst, then query all buildings in the boundingbox and check for an intersection with the line src dst.
I think that this is a pretty suboptimal implementation. Maybe there are some fancy implementations for the problem... But I just could not find one in OpenLayers.
Has anyone an idea to improve that or a link to a function I just did not notice?