# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## geotools-gt2-users

 [Geotools-gt2-users] Calculating the distance between two points. From: Sebastien Arbogast - 2005-10-24 22:05:37 Attachments: Message as HTML I'm working on a Maven project in which I need to calculate the geodetic distance between two points which I know the latitude and longitude in degrees (double). I know there are utility methods in GeoTools to do that, especially in GeodeticCalculator, but I don't know how I can use them in my project. - Is there a public maven repository for geotools ? - What dependencies should I declare in my POM to download them automatically when my project is built ? - What is the typical use case for calculating such a distance ? Thanks in advance. Best regards. -- S=E9bastien Arbogast Blog : http://www.sebastien-arbogast.com The Epseelon Project : http://www.epseelon.org Projet Ph=E9nix : http://phenix.netbios.fr
 [Geotools-gt2-users] Calculating the distance between two points. From: tawisak - 2013-05-10 17:32:43 Now i follow tutorial http://docs.geotools.org/latest/userguide/tutorial/quickstart/netbeans.html. then i import my shapefile to program. next i want to calcalate the distance between two points. please show the code. many thank. chio -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Calculating-the-distance-between-two-points-tp5052624.html Sent from the geotools-gt2-users mailing list archive at Nabble.com.
 Re: [Geotools-gt2-users] Calculating the distance between two points. From: Martin Desruisseaux - 2005-10-24 22:22:12 Sebastien Arbogast a =E9crit : > - Is there a public maven repository for geotools ? There is a brand new Maven 2 snapshot repository! Current adress is: http://maven.espace.ird.nc/ However this adress is temporary. We are trying to setup a=20 http://maven.geotools.org adress right now, but still have some=20 technical problem. In the maintime, the above-cited adress should work. > - What dependencies should I declare in my POM to download them=20 > automatically when my project is built ? For the GeodeticCalculator class, the following should be enough: org.geotools gt2-referencing 2.2-SNAPSHOT I would be very interrested to know if you encounter any issue. Since=20 this repository is new, we are still getting experience about its use. > - What is the typical use case for calculating such a distance ? GeodeticCalculator gc =3D new GeodeticCalculator(); gc.setAnchorPoint(longitude, latitude); gc.setDestinationPoint(longitude, latitude); double dist =3D gc.getOrthodromicDistance(); Note that if you use any other coordinate reference system than the=20 standard Geographic CRS on WGS84 ellipsoid, you can specify yours CRS in=20 the constructor. GeodeticCalculator will then applies the coordinate=20 transformations for you (if you uses the method expecting Position=20 argument). Martin.
 Re: [Geotools-gt2-users] Calculating the distance between two points. From: Martin Desruisseaux - 2005-10-24 22:54:36 Sebastien Arbogast a =E9crit : > Thank you for your very precise answer. I should have been more precise= =20 > myself in my question : I'm still using Maven 1.0.2 and according to th= e=20 > structure of the maven repository you pointed out, it's made for Maven=20 > 2.0. At least I suppose so as I don't recognize the naming convention=20 > and those metadata.xml files. The result is that my Maven can't find th= e=20 > file and as I cannot upgrade to Maven 2 because I'm using a special=20 > Maven plugin that hasn't been ported to M2 yet, I'm afraid that might b= e=20 > a dead-end :oS Yes, this repository is a Maven 2 repository and is incompatible with=20 Maven 1. I don't know if there is a real Maven 1 repository, but you may=20 take a look at http://dist.geotools.org/gt2/jars/. Martin.