Is it possible to check if a location(Latitude, Longitude) is within a polygon using JAVA. I know this is possible in JavaScript. I found the Client library for Java but cant find ways to do this like ine JavaScript using e.g
containsLocation();
or if it is a way to use a url and do a http request with the url where i plot in the polygon and match it with the coordinates I want to check?
Ive tried the Client libs for Java but cant find any ways of doing it.
Any help is greatly appreciated.
PS: I must use Java
EDIT:
I found out this:
Polygon poly = new Polygon();
poly.addPoint(100, 100);
poly.addPoint(100, 0);
poly.addPoint(0, 0);
poly.addPoint(0, 100);
Point p = new Point(99, 99);
System.out.println(poly.contains(p));