由于长期/纬度坐标的数据库重新presenting目标和一系列纬度/经度重新$ P $的psenting多边形的边界坐标重新presenting区。使用一个简单的光线投射算法是安全的治疗纬度/只要直角坐标确定的目标是在禁区内?
Given a database of long/lat coordinates representing targets and a series of lat/long representing the bounding coordinates of polygons representing "zones". Using a simple ray casting algorithm is it safe to treat the lat/long as cartesian coordinates for determining if the target is within the zone?
提供的边缘很短,它应该工作不够好。这不会是正确的,但。
Provided the edges are short, it should work well enough. It won't be "correct" though.
想象具有两个点A和B在赤道上,一个只是短的北极的三角形。显然,(几乎)全部与赤道上空a和b之间的经度点都在三角形。但是,如果我们试图处理拉特/多头为直角坐标系中,我们得到的东西完全不同...
Imagine a triangle with two points a and b on the equator and one just short of the north pole. Evidently, (almost) all points with a longitude between a and b above the equator are in the triangle. But if we try treating the lats/longs as cartesian coordinates, we get something quite different...
编辑:你必须要小心与跨越经度=最大值/最小值,更小心那些还含有极
You'll need to be careful with zones which cross longitude = max/min, and even more careful with the ones that also contain a pole
上一篇:共振算法来检测间距间距、算法