문제

I'm trying to figure out which unit JTS LineString.getLength() return.

for example:

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

Are these Kilometers?, Meters?, Feet?

도움이 되었습니까?

해결책 2

It's in degrees.

다른 팁

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top