小数纬度/经度的最大长度 度?
地球表面一度纬度和经度的最大长度是多少(以公里或英里为单位 - 但请注明)?
我不确定我是否说得足够清楚,让我重新表述一下。众所周知,地球不是一个完美的圆,赤道(或厄瓜多尔)纬度/经度变化 1.0 可能意味着一个距离,而两极的相同变化可能意味着另一个完全不同的距离。
我试图减少数据库(在本例中为 MySQL)返回的结果数量,以便我可以使用 大圆 公式。我不想选择所有点然后单独计算它们,我希望选择纬度/经度边界内的坐标,例如:
SELECT * FROM poi
WHERE latitude >= 75 AND latitude <= 80
AND longitude >= 75 AND longitude <= 80;
PS:已经晚了,我觉得我的英语没有按我的预期出现,如果有的话有什么您无法理解的地方请说出来,我会根据需要修复/改进它,谢谢。
What is the maximum length (in kilometers or miles - but please specify) that one degree of latitude and longitude can have in the Earth surface?
I'm not sure if I'm being clear enough, let me rephrase that. The Earth is not a perfect circle, as we all know, and a change of 1.0 in the latitude / longitude on the equator (or in Ecuador) can mean one distance while the same change at the poles can mean another completely different distance.
I'm trying to shrink down the number of results returned by the database (in this case MySQL) so that I can calculate the distances between several points using the Great Circle formula. Instead of selecting all points and then calculating them individually I wish to select coordinates that are inside the latitude / longitude boundaries, e.g.:
SELECT * FROM poi
WHERE latitude >= 75 AND latitude <= 80
AND longitude >= 75 AND longitude <= 80;
PS: It's late and I feel that my English didn't came up as I expected, if there is something that you are unable to understand please say so and I'll fix/improve it as needed, thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
纬度长度变化不大,赤道处约 110.6 公里,两极附近约 111.7 公里。如果地球是一个完美的球体,它就会是恒定的。对于诸如获取已知(纬度、经度)10 公里范围内的点列表之类的目的,假设常数 111 公里应该没问题。
然而,对于经度来说,情况就完全不同了。它的范围从赤道约111.3公里,纬度60度约55.8公里,纬度89度约1.9公里到极地零。
你问错了问题;您需要知道最小长度以确保您的查询不会拒绝有效的候选者,不幸的是经度的最小长度为零!
假设您采纳其他人的建议,对纬度和经度都使用约 111 公里的常量。对于 10 公里的查询,您将使用 10 / 111 = 0.09009 度的纬度或经度的边距。这在赤道上是可以的。然而,在北纬 60 度(例如斯德哥尔摩所在位置),向东行驶 0.09 度经度只能到达约 5 公里。在这种情况下,您错误地拒绝了大约一半的有效答案!
幸运的是,获得更好的经度范围(取决于已知点的纬度)的计算非常简单 - 请参阅 这个答案,以及它引用的 Jan Matuschek 的文章。
The length of a degree of latitude varies little, between about 110.6 km at the equator to about 111.7 near the poles. If the earth were a perfect sphere, it would be constant. For purposes like getting a list of points within say 10 km of a known (lat, lon), assuming a constant 111 km should be OK.
However it's quite a different story with longitude. It ranges from about 111.3 km at the equator, 55.8 km at 60 degrees latitude, 1.9 km at 89 degrees latitude to zero at the pole.
You asked the wrong question; you need to know the MINIMUM length to ensure that your query doesn't reject valid candidates, and unfortunately the minimum length for longitude is ZERO!
Let's say you take other folk's advice to use a constant of about 111 km for both latitude and longitude. For a 10 km query, you would use a margin of 10 / 111 = 0.09009 degrees of latitude or longitude. This is OK at the equator. However at latitude 60 (about where Stockholm is, for example) travelling east by 0.09 degrees of longitude gets you only about 5 km. In this case you are incorrectly rejecting about half of the valid answers!
Fortunately the calculations to get a better longitude bound (one that depends on the latitude of the known point) is very simple -- see this SO answer, and the article by Jan Matuschek that it references.
最初,海里的定义是赤道上一分钟经度的长度。因此,赤道周围有 360 * 60 = 21,600 海里。同样,一公里的原始定义是 10,000 公里 = 从极点到赤道的长度。因此,假设地球是球形的,则为:
允许使用球形地球而不是球形地球会稍微调整该系数,但幅度不会太大。您可以非常确信该系数小于每分钟 1.9 公里或每度 114 公里。
Originally, the definition of a nautical mile was the length of one minute of longitude on the equator. So, there were 360 * 60 = 21,600 nautical miles around the equator. Similarly, the original definition of a kilometer was that 10,000 km = length from pole to equator. Consequently, assuming a spherical earth, there would be:
Allowing for a spheroidal earth instead of a spherical one will slightly adjust the factor, but not by all that much. You could be pretty confident the factor is less than 1.9 km per minute or 114 km per degree.
如果您可以使用 MySQL 空间扩展: http://dev.mysql.com/spatial-extensions.html mysql.com/doc/refman/5.0/en/spatial-extensions.html,您可以使用其运算符和函数来过滤点和计算距离。请参阅 http:// /dev.mysql.com/doc/refman/5.0/en/functions-that-test-spatial-relationships- Between-geometries.html,特别是函数 contains() 和 <强>距离()。
If you can use MySQL spatial extensions: http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html, you can use its operators and functions both to filter the points and calculate distances. See http://dev.mysql.com/doc/refman/5.0/en/functions-that-test-spatial-relationships-between-geometries.html, specifically the functions contains() and distance().
地球使用的参考椭球体是WGS84系统,意味着
赤道的地球半径长度为
6 378 137 m 或 3963.19 英里
经度的最大长度在赤道处达到,大约为(上限)
111.3195 公里 或
69.1708 英里
赤道和 1° 之间达到 1 纬度的最大长度。它几乎正好等于经度的最大长度;第一次近似显示差异小于 4.2 米,即
111.3153 公里或
69.1682 英里
The reference ellipsoid used for the earth is the WGS84 system, meaning
that the earth radius for the equator has the length of
6 378 137 m or 3963.19 miles
The maximum length of longitude is reached at the equator and is approximately (upper bound)
111.3195 km or
69.1708 miles
The maximum length of one degree latitude is reached between the equator and 1°. It is almost exactly equal to the maximum length of longitude; a first approximation shows that the difference is less than 4.2 meters yielding
111.3153 km or
69.1682 miles