开发者

Which unit does JTS LineString.getLength() use

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜