Beispiel #1
0
 public void Parse(string text, ICoordinateSystem system)
 {
     _Geography = new SqlGeography(SqlTypes.SqlGeography.STGeomFromText((SqlChars)((SqlString)text), system.Code), system);
 }
Beispiel #2
0
 public void Parse(byte[] data, ICoordinateSystem system)
 {
     _Geography = new SqlGeography(SqlTypes.SqlGeography.STGeomFromWKB(new SqlBytes(data), system.Code), system);
 }
Beispiel #3
0
        /// <summary>Indicates whether the 2 geometries intersect or not.</summary>
        /// <param name="geometry">The geometry to test against.</param>
        /// <returns><c>true</c> if the 2 geometries intersect, or else <c>false</c>.</returns>
        public bool Intersects(ISimpleGeometry geometry)
        {
            SqlGeography other = ToGeography(geometry);

            return(_Geography.STIntersects(other._Geography).Value);
        }
Beispiel #4
0
        /// <summary>Indicates whether the 2 geometries are disjoint or not.</summary>
        /// <param name="geometry">The geometry to test against.</param>
        /// <returns><c>true</c> if the 2 geometries are disjoint, or else <c>false</c>.</returns>
        public bool Disjoint(ISimpleGeometry geometry)
        {
            SqlGeography other = ToGeography(geometry);

            return(_Geography.STDisjoint(other._Geography).Value);
        }
Beispiel #5
0
        /// <summary>Returns the shortest distance between any 2 points in the 2 geometries.</summary>
        /// <param name="geometry">The geometry to calculate the distance from.</param>
        /// <returns>The shortest distance between any 2 points in the 2 geometries.</returns>
        public double Distance(ISimpleGeometry geometry)
        {
            SqlGeography other = ToGeography(geometry);

            return(_Geography.STDistance(other._Geography).Value);
        }
 public void Parse(byte[] data, ICoordinateSystem system)
 {
     _Geography=new SqlGeography(SqlTypes.SqlGeography.STGeomFromWKB(new SqlBytes(data), system.Code), system);
 }
 public void Parse(string text, ICoordinateSystem system)
 {
     _Geography=new SqlGeography(SqlTypes.SqlGeography.STGeomFromText((SqlChars)((SqlString)text), system.Code), system);
 }