I have done something like this:
Pseudo:
`Function checkOverlap(thisRectangle, otherRectangle):
if thisRectangle.UpperRight.Longitude < otherRectangle.LowerLeft.Longitude
return false
if thisRectangle.LowerLeft.Longitude > otherRectangle.UpperRight.Longitude
return false
if thisRectangle.UpperRight.Latitude < otherRectangle.LowerLeft.Latitude
return false
if thisRectangle.LowerLeft.Latitude > otherRectangle.UpperRight.Latitude
return false
return true`
But I also have to deal with the international date-line. Any suggestions to how to account for this?
New contributor
Martin Yakoslaw is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.