Calculate Sector & Find Point Inside with PHP

المشرف العام

Administrator
طاقم الإدارة
I've been trying to find out how to do this kind of stuff with PHP and haven't had much luck so I thought I'd ask here.

My scenario is this. I have a lat/lng point and need to be able to calculate sectors around it (for example from 0 to 180 degrees and another from 180 to 360) - then I have another lat/lng point and I need to be able to determine whether or not that point falls inside of which sector, and if so which one.

Right now I have this working using the google maps api, using the polygon plugin to draw the sectors and the geometry plugin to find out if a given latitude/longitude falls inside of a polygon.

I'm trying to find out if theres an equivalent way to do that sort of thing in PHP specifically. If knowing the development environment is helpful its a LAMP stack.



أكثر...
 
أعلى