Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java-util of geofence polygon

    GeoPolygon fence = new GeoPolygon( // Define a Fence Polygon 
            new GeoPoint(-31.414547, -64.488178),
            new GeoPoint(-31.415579, -64.496261),
            new GeoPoint(-31.411513, -64.495720),
            new GeoPoint(-31.408726, -64.489549),
            new GeoPoint(-31.411898, -64.484406)
            );

    GeoPoint testgp1 = new GeoPoint(-31.411753, -64.489922);// Point1 inside
    GeoPoint testgp2 = new GeoPoint(-31.413962, -64.486445);// Point2 outside


    boolean inzone = fence.isPointInside(testgp1);
    System.out.println ("Point1 is inside of polygon= "+inzone);
    inzone = fence.isPointInside(testgp2);
    System.out.println ("Point2 is inside of polygon= "+inzone);
Comment

java-util of geofence polygon

    GeoPolygon fence = new GeoPolygon( // Define a Fence Polygon 
            new GeoPoint(-31.414547, -64.488178),
            new GeoPoint(-31.415579, -64.496261),
            new GeoPoint(-31.411513, -64.495720),
            new GeoPoint(-31.408726, -64.489549),
            new GeoPoint(-31.411898, -64.484406)
            );

    GeoPoint testgp1 = new GeoPoint(-31.411753, -64.489922);// Point1 inside
    GeoPoint testgp2 = new GeoPoint(-31.413962, -64.486445);// Point2 outside


    boolean inzone = fence.isPointInside(testgp1);
    System.out.println ("Point1 is inside of polygon= "+inzone);
    inzone = fence.isPointInside(testgp2);
    System.out.println ("Point2 is inside of polygon= "+inzone);
Comment

PREVIOUS NEXT
Code Example
Java :: java tostring methode überschreiben 
Java :: java opengl get fps 
Java :: converting amount into millions nad billions Java 
Java :: Returning methods 
Java :: hierarchy inheritance gfg java 
Java :: for loop in firebase snapshot in java 
Java :: conditional statement problems in java 
Java :: java replace nans with 0 csv line 
Java :: java virtual override 
Java :: Converting data in java 
Java :: linux mint switch language 
Java :: longadder 
Java :: java makefile clean bin 
Java :: raspberry stackexchange how to install the java jdk 
Java :: request.iter_content(1024 * 1024) 
Java :: java code to input non blank string 
Java :: java remove element from list 
Java :: primefaces p:dataexporter encoding for pdf 
Java :: coustimized divider in android 
Java :: Uri/Beecrowd Problem no - 1185 Solution in Java 
Java :: how to sort a collection using stream 
Java :: ternary search in java 
Java :: menuitemcompat getactionview is deprecated in android 
Java :: No Duplicate Key on HashMap 
Java :: Java labeled break Statement 
Java :: Java Public Access Modifier package two 
Java :: instance field java 
Java :: Duplicate entry Exception 
Java :: how to refresh activity intent in android 
Java :: longest palindrome string in java 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =