问题描述
当使用 DbGeography.Distance(otherLocation)
测量两个位置之间的距离时,距离的单位是什么?
When measuring the distance between two locations using the DbGeography.Distance(otherLocation)
what is the unit of the distance?
连msdn信息和intellisense都无法指定距离的单位.
Even the msdn information and the intellisense fails to specify the unit of the distance.
有人知道吗?
我正在使用 srid 4326.大多数示例似乎都在使用它.据我所知,4326 似乎是弧度,这让我完全一无所知.弧度用于测量角度/度数,这在现实中意味着什么?
[edit] I'm using srid 4326. which most examples seems to use. From what I can find, 4326 seems to be radians, this leaves me completely clueless. radians are used to measure angles/degrees so what does this mean in reality ?
推荐答案
似乎有几篇文章同意在 4326 中使用米作为距离单位.
Several articles seem to agree on meters being used in 4326 as the unit of distance.
WGS 84 也是以米为单位的,这可能就是它使用米的原因.
WGS 84 is done in meters as well, which is probably why this uses meters.
http://blogs.msdn.com/b/adonet/archive/2011/06/30/walkthrough-spatial-june-ctp.aspxhttp://www.jasonfollas.com/blog/archive/2011/07/20/entity-framework-spatial-first-look.aspxhttp://blog.simplecode.eu/post/DistancesWithDbGeographyAndDbGeometry
这篇关于System.Data.Spatial DbGeography.Distance 单位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!