dbraughlr wrote:Create buckets to divide the map into equal sized squares, say 1 km².
Sure, I meant current map view not the whole map. On zoom levels 4-5 WME map view is about 1 km² in size.
dbraughlr wrote:For each segment on the map, determine which square(s) it crosses and add it (or a portion of it) to the bucket for those square(s).
No doubt those buckets will reduce number of comparisons, but add complexity. And still there are will be thousands of comparisons and the check still will be very slow.
So we're looking at quite slow and complex check here. But what's is the "goal"? Does this non-ground elevation affects TTS or routing?