Q:

What are the distance units in com.vividsolutions.jts.geom.Geometry class?

Our VB.NET project is using a Java library from Vivid Solutoins (com.vividsolutions.jts.geom.Geometry) to do Geometry calculations.  The help is here: http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html
What I can't figure out are the units specifically for the Buffer property, or any other distance for that matter.  My program is dealing with Nautical Miles, and the documentation gives no indication if the units are degrees, miles, Nautical Miles, Kilometers, inches, etc.
Has anyone used this library who knows the answer?  Thanks in advance.

A:

First of all, I don't know this API, I've just browsed the link you've given.
Judging by the Javadocs for Coordinate, it says:

[Coordinate is a] lightweight class used to store coordinates on the 2-dimensional Cartesian plane. It is distinct from Point, which is a subclass of Geometry. Unlike objects of type Point (which contain additional information such as an envelope, a precision model, and spatial reference system information)

So it would seem that Geometry has no units as such, but Point, its subclass, does, and you can specify them.
I wouldn't be surprised if the Geometry class doesn't have any units as such, and just represents the concept of a point in space in any particular coordinate system.

A:

This is an old post, but here is the answer for anyone else who is looking, since incredibly the java docs do not state the units returned by the method.  The distance returned is in central angle degrees.  You can then use any number of formulas to convert to your required unit of measure.  The simplest is to convert to radians.  1 radian = 180 degrees divided by pi (rad=180deg/pi).  From there, you can multiply radians by the average radius of the earth in your choice of units (6371 km for instance) to get distance between two points.  More accurate methods are also available, but you can look them up on the net.

