首先,我在 force.com APEX 中对此进行编码。
我有一个谷歌地球 KML。在这个 KML 文件中,我有一系列坐标:
<coordinates>
-73.920776,40.710476,0.000000
-73.926125,40.705692,0.000000
-73.933609,40.702782,0.000000
...
...
-73.924210,40.714085,0.000000
-73.922409,40.712849,0.000000
-73.920776,40.710476,0.000000
</coordinates>
我想做的是创建一个包含我所有坐标的数组,然后能够检查给定的纬度/经度是否在坐标范围内。我已经查看了多边形内的点,但想看看是否有更简单的方法。
谢谢弗兰克