Пример #1
0
        /// <summary>Returns the centroid for the current geometry.</summary>
        /// <returns>The centroid for the current geometry.</returns>
        public ISimpleGeometry Centroid()
        {
            // Transform into SqlGeometry, calculate, then back to SqlGeography
            // We would do this if we dealt with geometries anyway. Not sure it makes much sense, though...

            return(ToGeography(SqlGeometry.ToGeometry(this).Centroid()));
        }
Пример #2
0
        /// <summary>Indicates whether the current geometry contains the specified <paramref name="geometry" /> or not.</summary>
        /// <param name="geometry">The geometry to test against.</param>
        /// <returns><c>true</c> if the current geometry contains the specified <paramref name="geometry" />, or else <c>false</c>.</returns>
        public bool Contains(ISimpleGeometry geometry)
        {
            // Transform into SqlGeometry, then calculate
            // We would do this if we dealt with geometries anyway. Not sure it makes much sense, though...

            return(SqlGeometry.ToGeometry(this).Contains(geometry));
        }