我们的 VB.NET 项目使用来自 Vivid Solutoins (com.vividsolutions.jts.geom.Geometry) 的 Java 库来进行几何计算.帮助在这里:http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html
Our VB.NET project is using a Java library from Vivid Solutoins (com.vividsolutions.jts.geom.Geometry) to do Geometry calculations. The help is here: http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html
我想不通的是专门用于 Buffer 属性的单位,或者与此相关的任何其他距离.我的程序正在处理海里,文档没有说明单位是度、英里、海里、公里、英寸等.
What I can't figure out are the units specifically for the Buffer property, or any other distance for that matter. My program is dealing with Nautical Miles, and the documentation gives no indication if the units are degrees, miles, Nautical Miles, Kilometers, inches, etc.
有没有人用过这个知道答案的库?提前致谢.
Has anyone used this library who knows the answer? Thanks in advance.
这是一篇旧帖子,但对于其他正在寻找的人来说,这里是答案,因为令人难以置信的是 java 文档没有说明方法返回的单位.返回的距离以中心角为单位.然后,您可以使用任意数量的公式转换为所需的计量单位.最简单的是转换为弧度.1 弧度 = 180 度除以 pi (rad=180deg/pi).从那里,您可以用您选择的单位(例如 6371 公里)将弧度乘以地球的平均半径,以获得两点之间的距离.也有更准确的方法,但您可以在网上查找.
This is an old post, but here is the answer for anyone else who is looking, since incredibly the java docs do not state the units returned by the method. The distance returned is in central angle degrees. You can then use any number of formulas to convert to your required unit of measure. The simplest is to convert to radians. 1 radian = 180 degrees divided by pi (rad=180deg/pi). From there, you can multiply radians by the average radius of the earth in your choice of units (6371 km for instance) to get distance between two points. More accurate methods are also available, but you can look them up on the net.
这篇关于com.vividsolutions.jts.geom.Geometry 类中的距离单位是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!