
Geometry : 
Subject: [geometry] relate
From: Barend Gehrels (barend_at_[hidden])
Date: 20130927 03:30:05
Hi,
Based on our recent postings, now that Adam is busy with the turns and translation to within, It is probably a good moment to make one step in between. If we map the turn information to the De9im matrix, or make a sort of relation with that, we could get the touch/within/overlaps info easiy from that. This will cost now little more time but we can then develop the other relations way more easy, and in the end the "relate" is also in the ogc spec.
Besides that we might use it (now or later) in the interrupt policy, such that the turn process stops as soon as a turn is wrong w.r.t. the required operation.
I did not work it all out yet (now in train) but we could basically initialize de9im matrix with the combinations we want (from a to b and from b to a, if a and b are input polygons). And pass this to a new interrupt policy. For each turn the info is translated to a sort of turnmatrix, which is then compared to the info in the desired matrix.
This is either OK or not OK (if not we can stop the intersection process). After returning we already know the result and do not have to examine the turnvector (as is done now in touches).
For the relate the process is different, the de9im matrix is then only filled from the turn information.
It is not required to do this in the interrupt policy, we can start doing the translations to and from matrix afterwards (and if convenient do it in the process later).
Regards, Barend
Sent from iPad.
Barend Gehrels
www.barendgehrels.nl
Geometry list run by mateusz at loskot.net