Page 2 of 2

Re: GIS Boundary on the Google Earth

Posted: January 12th, 2019, 9:07 pm
by htuser
Hi Josh,
It can be ported, but since Cspro logic doesn't recognize geographic object (polygon, line) it's very difficult, if not impossible to calculate this distance right now.
The distance is very important to warn enumerators that's he's very near of the boundary or he's leaving his assignment area.
But, the most important for Cspro application developer is to know if a point (geographic coordinates) is inside or outside a polygon. In this event, the application can stop on the fly and avoid an enumerator to interview anybody outside of his Area Of Interest...

There's lot of existing methods/functions to do that and no need to reinvent the wheel...
https://en.wikipedia.org/wiki/Point_in_polygon
https://stackoverflow.com/questions/363 ... -in-python

In the new geospatial feature it will be very important to have basic functions able to:
a) Calculate bearing (point to nearest polygon/line). It's very important to warn about area of interest boundary;
b) Calculate point to polygon/line distance;
c) Calculate point position relative to a polygon (inside? Outside?).

Best Regards,