/** * Takes a {@link Point} and a {@link Polygon} and determines if the point resides inside the * polygon. The polygon can be convex or concave. The function accounts for holes. * * @param point which you'd like to check if inside the polygon * @param polygon which you'd like to check if the points inside * @return true if the Point is inside the Polygon; false if the Point is not inside the Polygon * @see <a href="http://turfjs.org/docs/#inside">Turf Inside documentation</a> * @since 1.3.0 */ public static boolean inside(Point point, Polygon polygon) { // This API needs to get better List<List<Point>> coordinates = polygon.coordinates(); List<List<List<Point>>> multiCoordinates = new ArrayList<>(); multiCoordinates.add(coordinates); return inside(point, MultiPolygon.fromLngLats(multiCoordinates)); }