@Test public void testContainsLocation() { containsCase(makeList(), makeList(), makeList(0, 0)); containsCase(makeList(1, 2), makeList(1, 2), makeList(0, 0)); containsCase(makeList(1, 2, 3, 5), makeList(1, 2, 3, 5), makeList(0, 0, 40, 4)); containsCase( makeList(0., 0., 10., 12., 20., 5.), makeList(10., 12., 10, 11, 19, 5), makeList(0, 1, 11, 12, 30, 5, 0, -180, 0, 90)); containsCase( makeList(89, 0, 89, 120, 89, -120), makeList(90, 0, 90, 180, 90, -90), makeList(-90, 0, 0, 0)); containsCase( makeList(-89, 0, -89, 120, -89, -120), makeList(90, 0, 90, 180, 90, -90, 0, 0), makeList(-90, 0, -90, 90)); containsCase( makeList(5, 10, 10, 10, 0, 20, 0, -10), makeList(2.5, 10, 1, 0), makeList(15, 10, 0, -15, 0, 25, -1, 0)); }
public static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic) { return containsLocation(point.latitude, point.longitude, polygon, geodesic); }
PolyUtil { public static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic) { return containsLocation(point.latitude, point.longitude, polygon, geodesic); } }
PolyUtil { public static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic) { return containsLocation(point.latitude, point.longitude, polygon, geodesic); } private  PolyUtil(); }
PolyUtil { public static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic) { return containsLocation(point.latitude, point.longitude, polygon, geodesic); } private  PolyUtil(); static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic); static boolean containsLocation(double latitude, double longitude, List<LatLng> polygon, boolean geodesic); static boolean isLocationOnEdge(LatLng point, List<LatLng> polygon, boolean geodesic,
                                           double tolerance); static boolean isLocationOnEdge(LatLng point, List<LatLng> polygon, boolean geodesic); static boolean isLocationOnPath(LatLng point, List<LatLng> polyline,
                                           boolean geodesic, double tolerance); static boolean isLocationOnPath(LatLng point, List<LatLng> polyline,
                                           boolean geodesic); static int locationIndexOnPath(LatLng point, List<LatLng> poly,
                                          boolean geodesic, double tolerance); static int locationIndexOnPath(LatLng point, List<LatLng> polyline,
                                          boolean geodesic); static int locationIndexOnEdgeOrPath(LatLng point, List<LatLng> poly, boolean closed,
                                                boolean geodesic, double toleranceEarth); static List<LatLng> simplify(List<LatLng> poly, double tolerance); static boolean isClosedPolygon(List<LatLng> poly); static double distanceToLine(final LatLng p, final LatLng start, final LatLng end); static List<LatLng> decode(final String encodedPath); static String encode(final List<LatLng> path); }
PolyUtil { public static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic) { return containsLocation(point.latitude, point.longitude, polygon, geodesic); } private  PolyUtil(); static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic); static boolean containsLocation(double latitude, double longitude, List<LatLng> polygon, boolean geodesic); static boolean isLocationOnEdge(LatLng point, List<LatLng> polygon, boolean geodesic,
                                           double tolerance); static boolean isLocationOnEdge(LatLng point, List<LatLng> polygon, boolean geodesic); static boolean isLocationOnPath(LatLng point, List<LatLng> polyline,
                                           boolean geodesic, double tolerance); static boolean isLocationOnPath(LatLng point, List<LatLng> polyline,
                                           boolean geodesic); static int locationIndexOnPath(LatLng point, List<LatLng> poly,
                                          boolean geodesic, double tolerance); static int locationIndexOnPath(LatLng point, List<LatLng> polyline,
                                          boolean geodesic); static int locationIndexOnEdgeOrPath(LatLng point, List<LatLng> poly, boolean closed,
                                                boolean geodesic, double toleranceEarth); static List<LatLng> simplify(List<LatLng> poly, double tolerance); static boolean isClosedPolygon(List<LatLng> poly); static double distanceToLine(final LatLng p, final LatLng start, final LatLng end); static List<LatLng> decode(final String encodedPath); static String encode(final List<LatLng> path); static final double DEFAULT_TOLERANCE; }