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.
精彩评论