I'm looking for a way to check if 2 polygons (set of lat/lon coordinates) overlap in ruby. So for example if I have a points for the USA and points for California, I should be able to tell that they overlap.
I looked into rgeo, but apparently it requires some linux-only binaries to get it to work and I'm looking for a cross platform solution.
For example let's say I have 2 polygons that look like:
p1 = [[30, 30], [30, 40], [40, 40], [40, 30], [30, 30]]
p2 = [[35, 35], [35, 45], [45, 45], [45, 35], [35, 35]]
How can I show that they overlap in ruby?