如何将一个地理方格扩大500米?
假设我有一个地理正方形/矩形,其中有西北角和东南角的纬度/经度定义。
我想将这个正方形的矩形向每个方向扩展 500 米。我应该采取什么方法?举个例子就太好了。
PS 地球并不平坦,正如有些人想让我们相信的那样,所以我愿意接受近似模型。
Let say I have a geographical square/rectangle where I have lat/lon definitions of the Northwest and Southeast corners.
I'd like to expand this square rectangle by 500 meters in each direction. What is the approach I should take? An example would be great.
P.S. Earth is not flat, as some would have us believe, so I am willing to live with the approximate model.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
找到从弧分和秒到米的转换,进行转换、相加,然后再转换回来。
编辑:地球的周长以米为单位约为 40,000,000(米的原始定义)。由于看起来您需要任意矩形的解决方案,因此假设一个球体,然后需要向每条边添加 360 * 500 / 40,000,000 = 0.0045 度 = 16.2 角秒。
Find the conversion from minutes and seconds of arc to meters, convert, add, and convert back.
Edit: The circumference of the Earth in meters is ~40,000,000 (original definition of meter). Since it looks like you need a solution for an arbitrary rectangle, assume a sphere and then 360 * 500 / 40,000,000 = 0.0045 degrees = 16.2 arc seconds is what you need to add to each side.
纬度/经度到距离是用 Haversine 公式完成的,但我不知道不认为反转是微不足道的。不过,对于如此短的距离,您可能可以在给定的纬度上以米为单位计算弧秒的距离,并适当相乘。
Lat/long to distance is done with the Haversine formula, but I don't think it's trivial to invert. For such a short distance, though, you can probably get away with calculating the distance in metres of a second of arc at your given latitude, and multiply up appropriately.