开发者

Which unit does JTS LineString.getLength() use

开发者 https://www.devze.com 2023-01-03 11:22 出处:网络
I\'m trying to figure out which unit J开发者_StackOverflow社区TS LineString.getLength() return. for example:

I'm trying to figure out which unit J开发者_StackOverflow社区TS LineString.getLength() return.

for example:

LineString foo = (initialize line string somehow)
foo.getLength() -> 7.025667228118838E-4

Are these Kilometers?, Meters?, Feet?


It depends in which unit your coordinate geometries are expressed. If your coordinates are in meters, the perimeter will also be in meters.


It's in degrees.


com.vividsolutions.jts.geom.Geometry.getLength() returns a length/perimeter in meters. com.vividsolutions.jts.geom.Geometry.getArea() returns an area in squaremeters.

0

精彩评论

暂无评论...
验证码 换一张
取 消