public static double distance ( Geometry geometry1 , Geometry geometry2 , SpatialReference spatialReference ) { OperatorDistance op = ( OperatorDistance ) factory . getOperator ( Operator . Type . Distance ) ; double result = op . execute ( geometry1 , geometry2 , null ) ; return result ; }
Calculates the 2D planar distance between two geometries .