public static Coordinate[] NearestPoints(Geometry g1, Geometry g2)
        {
            var dist = new IndexedFacetDistance(g1);

            return(dist.NearestPoints(g2));
        }
        /// <summary>
        /// Computes the distance between two geometries using the indexed approach.
        /// </summary>
        /// <remarks>
        /// For geometries with many segments or points,
        /// this can be faster than using a simple distance
        /// algorithm.
        /// </remarks>
        /// <param name="g1">A geometry</param>
        /// <param name="g2">A geometry</param>
        /// <returns>The distance between the two geometries</returns>
        public static double Distance(Geometry g1, Geometry g2)
        {
            var dist = new IndexedFacetDistance(g1);

            return(dist.Distance(g2));
        }