1 package au.gov.amsa.gt; 2 3 import java.util.Collection; 4 5 import com.vividsolutions.jts.geom.Coordinate; 6 import com.vividsolutions.jts.geom.GeometryFactory; 7 import com.vividsolutions.jts.geom.Point; 8 import com.vividsolutions.jts.geom.prep.PreparedGeometry; 9 10 public final class GeometryUtil { 11 12 public static boolean contains(GeometryFactory gf, Collection<PreparedGeometry> geometries, 13 double lat, double lon) { 14 Point point = gf.createPoint(new Coordinate(lon, lat)); 15 for (PreparedGeometry g : geometries) { 16 if (g.contains(point)) 17 return true; 18 } 19 return false; 20 } 21 }