'How to calculate distance between two lat/long coordinates in Java using JTS?

I have two coordinates with latitude and longitude, and I want to calculated the distance between them in meters/miles. Does the vividsolutions JTS library have the functionality to do this? If there is a function I can use please point me to it, thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source