I am using Google My Maps to map a suburb (as a polygon) on one layer and then on a second layer, all the (rural) properties (also as polygons) that exist in and around that suburb. The polygons are using geo coordinates to define the points. Eg (somewhat redacted):
<Polygon>
<outerBoundaryIs>
<LinearRing>
<tessellate>1</tessellate>
<coordinates>
150.523000,-34.720000,0
150.524000,-34.719000,0
150.524000,-34.719000,0
150.524000,-34.719000,0
150.523000,-34.719000,0
150.523000,-34.720000,0
150.523000,-34.720000,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
I am then using a bash script to modify the XML/KML to meet my requirements.
I was hoping that someone would have a magic bullet that, via the command line, allows me to specify an XML file and the XPATH to two polygons (within the XML file) and have it tell me if the two polygons intersect - something like:
check_polygons "/path/to/XML" "//_:xpath/to/polygon1" "//_:xpath/to/polygon2"
and it somehow (text or exit statuses) tells me if the two polygons intersect at any point.
Any assistance is greatly appreciated.