纬度和放大器;经度坐标足够点多边形算法 [英] latitude & longitude as coordinates adequate for point in polygon algorithm

查看:226
本文介绍了纬度和放大器;经度坐标足够点多边形算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于长期/纬度坐标的数据库重新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

这篇关于纬度和放大器;经度坐标足够点多边形算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆