Hi Martin,
Currently, all relate operations fail when one geometry or the other
is a GeometryCollection.
This restriction includes intersects predicate (with the notable
exception of Rectangles which use a short-circuit
and can successfully return true or false with a GeometryCollection
argument)
As intersects is probably the most used predicate and also a
predicate for which it is quite easy
to define the semantic with geometryCollection argument, I think it
could be possible to replace
the direct call to "relate" by :
for (int i = 0 ; i < this.getNumGeometries() ; i++) {
for (int j = 0 ; other.getNumGeometries() ; j++) {
if
(this.getGeometryN(i).relate(other.getGeometryN(j)).isIntersects())
return true;
}
}
return false;
What do you think ?
It may be more complex to handle also nested geometry
collections
Michaël
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/jts-dev