/** * Returns the distance between the given geometry and this geometry. Note * that this distance is in units the same as the units of the coordinate * reference system, and thus may not have any physical meaning (such as * when the coordinate system is a latitude/longitude system). */ public final double getDistance(final Geometry geometry) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) geometry).getJTSGeometry(); return JTSUtils.distance(jtsGeom1, jtsGeom2); }
/** * Returns the distance between the given geometry and this geometry. Note * that this distance is in units the same as the units of the coordinate * reference system, and thus may not have any physical meaning (such as * when the coordinate system is a latitude/longitude system). */ public final double getDistance(final Geometry geometry) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) geometry).getJTSGeometry(); return JTSUtils.distance(jtsGeom1, jtsGeom2); }