Overlaps returns true if the interiors of p and q have at least one point in common. Either they have a secant intersection, one path in contained in the other, or both paths are equal. This is different from DE-9IM's definition of Overlaps.
(q *Path)
| 248 | // they have a secant intersection, one path in contained in the other, or both paths are equal. |
| 249 | // This is different from DE-9IM's definition of Overlaps. |
| 250 | func (p *Path) Overlaps(q *Path) bool { |
| 251 | rel, _ := relate(p.Split(), q.Split(), false) |
| 252 | return (rel & 0x01) != 0 |
| 253 | } |
| 254 | |
| 255 | // Contains returns true if the interior of p contains the interior of q. Equal shapes contain |
| 256 | // each other. If p contains q, then q is within p. This tests DE-9IM's Covers relation. |