/** * Tests whether a point lies inside or on a ring. The ring may be oriented in * either direction. A point lying exactly on the ring boundary is considered * to be inside the ring. * <p> * This method does <i>not</i> first check the point against the envelope of * the ring. * * @param p * point to check for ring inclusion * @param ring * an array of coordinates representing the ring (which must have * first point identical to last point) * @return true if p is inside ring * * @see locatePointInRing */ public static boolean isPointInRing(Coordinate p, Coordinate[] ring) { return locatePointInRing(p, ring) != Location.EXTERIOR; }