What are the distance units in com.vividsolutions.jts.geom.Geometry class?

前端 未结 4 1704
温柔的废话
温柔的废话 2020-12-29 12:00

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

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-29 12:34

    As I recently worked on this library (http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html) and after investigation I found that the unit distance returned when call some of the methods distance calculation with this api will be in degree unit. To convert it to kilometer, assumes that value returned is d then you need to convert it to radian and multiply with earth radius 6371km. The formula would be d / 180 * PI * 6371.

提交回复
热议问题