예제 #1
0
        /// <summary>
        /// Gets all features inside the given bounding box and builds a geojson string.
        /// </summary>
        public static string GetGeoJsonIn(this RouterDb db, float minLatitude, float minLongitude,
                                          float maxLatitude, float maxLongitude, bool includeEdges = true, bool includeVertices = true)
        {
            var stringWriter = new StringWriter();

            db.WriteGeoJson(stringWriter, minLatitude, minLongitude, maxLatitude, maxLongitude, includeEdges, includeVertices);
            return(stringWriter.ToInvariantString());
        }
예제 #2
0
 /// <summary>
 /// Gets all features inside the given bounding box and writes them as a geojson string.
 /// </summary>
 public static void WriteGeoJson(this RouterDb db, Stream stream, float minLatitude, float minLongitude,
                                 float maxLatitude, float maxLongitude, bool includeEdges = true, bool includeVertices = true)
 {
     db.WriteGeoJson(new StreamWriter(stream), minLatitude, minLongitude, maxLatitude, maxLongitude, includeEdges, includeVertices);
 }