Beispiel #1
0
        /// <summary>
        /// Translate a GEOJSONObject to the corresponding SqlGeography. Please note that without any additional configuration,
        /// a FeatureCollection will turn into a GeometryCollection and the geometry of each feature will be added to that collection.
        /// </summary>
        public static SqlGeography Translate(GeoJSONObject geoJsonObject)
        {
            AssertValidity();
            var visitor = new GeoJsonToSqlGeographyObjectWalker();
            var walker  = new GeoJsonObjectWalker(geoJsonObject);

            walker.CarryOut(visitor);
            return(visitor.ConstructedGeography);
        }
Beispiel #2
0
 /// <summary>
 /// Translate a GEOJSONObject to the corresponding SqlGeography. Please note that without any additional configuration,
 /// a FeatureCollection will turn into a GeometryCollection and the geometry of each feature will be added to that collection.
 /// </summary>
 public static SqlGeography Translate(GeoJSONObject geoJsonObject)
 {
     AssertValidity();
     var visitor = new GeoJsonToSqlGeographyObjectWalker();
     var walker = new GeoJsonObjectWalker(geoJsonObject);
     walker.CarryOut(visitor);
     return visitor.ConstructedGeography;
 }