开发者

Point within a list of latitudes / longitudes

开发者 https://www.devze.com 2023-02-11 17:41 出处:网络
First, I\'m coding this in force.com APEX. I have a google earth KML. In this KML file I have a series of coordinates:

First, I'm coding this in force.com APEX.

I have a google earth KML. In this KML file I have a series of coordinates:

<coordinates>
    -73.920776,40.7104开发者_JAVA技巧76,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>

What I would like to do is create a array that has all my coordinates and then be able to check if a given lat/lon falls within the coordinates. I've reviewed the points within a polygon but would like to see if there is a simpler approach.

Thanks Frank


If you have a relatively small area - which doesn't go over the pole or through the international date line then point in polygon is enough.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号