Check if polygons intersect in c++
<p>I have two polygons whose minimum and maximum, latitude and longitude are given below:</p>

<pre><code>Polygon A: minimum_latitude=2.089 degree, maximum_latitude=2.93 degree, minimum_longitude=-122.95 degree, maximum_longitude=-122.85 degree

Polygon B: minimum_latitude=2.1 degree, maximum_latitude=2.83 degree, minimum_longitude=-121.95 degree, maximum_longitude=-120.85 degree
</code></pre>

<p>How do I check in c++ whether the Polygon A intersects (or is contained in) Polygon B or not?</p>

<p>My latitude and longitude are in degrees. Do I need to convert them to radians for checking whether the polygons intersect or not?</p>

<p>One way to check intersection is to check whether minimum_latitude of polygon B lies between minimum_latitude and maximum_latitude of polygon A and vice versa? Is this the correct way of checking. Do I need to convert the latitude and longitude to radians for performing the intersection test.</p>