I'm using Parse.com for my back-end, and in my table I have column named geopoint whose time type is GeoPoint. In another table I have the same. So I need to calculate distance between those two geopoints. Is there way to do that with parse? Or you can provide another solution. I'm using PHP
使用PHP计算解析时地理点之间的距离[关闭]
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
drxnfdx798517235 2015-11-02 15:20关注Without any code snippets it would be hard to give you the answer. I can point you in the right direction though.
As you are only using 2 points I assume you want Euclidean distance. (Straight line or 'as the crow flies')?
Wolfram has an excellent page on this here: http://mathworld.wolfram.com/Distance.html
It is (slightly) simplified here too: http://www.cut-the-knot.org/pythagoras/DistanceFormula.shtml
If you are still having trouble then post code snippets. Ideally something where you are already accessing these objects.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报