Which device uses JTS LineString.getLength ()

I am trying to figure out which device returns JTS LineString.getLength ().

eg:

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

Are these kilometers ?, meters ?, feet?

+3
source share
3 answers

In degrees.

0
source

Depending on in which part your coordinate geometries are expressed. If your coordinates are in meters, the perimeter will also be in meters.

+3
source

com.vividsolutions.jts.geom.Geometry.getLength () returns the length / perimeter in meters. com.vividsolutions.jts.geom.Geometry.getArea () returns the area in square meters.

-3
source

Source: https://habr.com/ru/post/1750277/


All Articles