[OSM-dev] disputed areas

Gervase Markham gerv-gmane at gerv.net
Sat Feb 9 15:39:22 GMT 2008


Tom Hughes wrote:
> Unfortunately that's quite hard as we don't have bounding boxes for
> ways so validating them against a bound is expensive. I wouldn't even
> know how to start to geographically validate a relation...

Ignoring relations for a moment, can we approximate the process of 
validating ways against bounds by validating the first and last nodes?

That would be between one and four comparisons per node, so between two 
and eight per way.

Alternatively, we could cache the info. Let's assume the adding new 
protected bboxes is rare. So have a DB boolean for every node which says 
"restricted?", and recalculate it for the entire world every time a new 
bbox is added. Then, the checking is really quick.

Gerv





More information about the dev mailing list