0

I have 2 polygons. "Polygon 1:" is expressed as (latitude,longitude) in degrees. And another "Polygon 2:" is expressed using geohash encoded cell id -- for my specific case I have assumed precision=5. Now I want to find out whether Polygon 1 and Polygon 2 intersect or not?

For Example, if my polygon (Polygon 1) in latitude and longitude (in degrees) is: (77.164230,33.187725|77.164188,33.188013|77.164066,33.188336|77.164457,33.188676|77.164685,33.188861|77.165012,33.189296|77.165467,33.188591|77.165490,33.188213|77.165085,33.188057|77.164811,33.187902|77.164230,33.187725)

Here, 77.164230 degree is latitude and 33.188013 degree is longitude. Then I want to find out whether my geohash encoded polygon "utxwg" (Polygon 2) intersects with the Polygon 1 or not? Is there some algorithm which I can use to find out whether an intersection exists or not?

Jannat Arora
  • 2,759
  • 8
  • 44
  • 70
  • Are these polygons defined on a sphere? Do you consider intersection if one polygon contains the other one? – Qbyte Feb 17 '16 at 13:02
  • @Qbyte Yes, intersection of one polygon may contains the other one. These polygons are not necessarily defined on a sphere. I mean these polygons may be of any shape. – Jannat Arora Feb 17 '16 at 13:32

0 Answers0