Provided that your boxes do not span more than 180 degrees in either direction, the relative signs of a few coordinate differences after subjecting them to mod(), with some XORs, will yield overlap. A web search will yield several algorithms, not to be repeated here. (Use the phrase "bounding box".) You may find [the Geopoly extension](https://sqlite.org/geopoly.html) useful. It can do general polygon overlap, although some trickery may be needed for anything that includes poles or the longitude 180.