|
From: Michael B. <mic...@gm...> - 2010-03-04 22:42:29
|
Hi Stefan, > A short test of the distance function let me assume that is DOES calculate > the perpendicular distance: Oops, you're quite right. That Dr JTS is a clever fellow :-) > Anyway, your solution looks more beautiful than the way I tried it before. > But when copy/paste your Code to my project, I can't find the class > PointPairDistance. Which jars do I need? The class is in the jts-1.10.jar from the GeoTools repo. If you're using maven you should get it automagically. Alternatively you can download it from here... http://download.osgeo.org/webdav/geotools/com/vividsolutions/jts/1.10/jts-1.10.jar PointPairDistance is in package com.vividsolutions.jts.algorithm.distance (as is the EuclideanDistanceToPoint class). I just checked the jts-1.10 jar and both classes seem to be there. Michael |