/** Determine the relationship between a shape and this area's * edgepoints. *@param path is the shape. *@return the relationship. */ protected int isAreaInsideShape(final GeoShape path) { final GeoPoint[] edgePoints = getEdgePoints(); if (edgePoints.length == 0) { return NO_EDGEPOINTS; } boolean foundOutside = false; boolean foundInside = false; for (final GeoPoint p : edgePoints) { if (path.isWithin(p)) { foundInside = true; } else { foundOutside = true; } if (foundInside && foundOutside) { return SOME_INSIDE; } } if (!foundInside && !foundOutside) return NONE_INSIDE; if (foundInside && !foundOutside) return ALL_INSIDE; if (foundOutside && !foundInside) return NONE_INSIDE; return SOME_INSIDE; }