Fluxera.Spatial.MongoDB
9.0.0
Prefix Reserved
dotnet add package Fluxera.Spatial.MongoDB --version 9.0.0
NuGet\Install-Package Fluxera.Spatial.MongoDB -Version 9.0.0
<PackageReference Include="Fluxera.Spatial.MongoDB" Version="9.0.0" />
paket add Fluxera.Spatial.MongoDB --version 9.0.0
#r "nuget: Fluxera.Spatial.MongoDB, 9.0.0"
// Install Fluxera.Spatial.MongoDB as a Cake Addin #addin nuget:?package=Fluxera.Spatial.MongoDB&version=9.0.0 // Install Fluxera.Spatial.MongoDB as a Cake Tool #tool nuget:?package=Fluxera.Spatial.MongoDB&version=9.0.0
Fluxera.Spatial
A libary that provides spatial types based on GeoJSON defined in RFC 7946.
Usage
Just use the provied structs to define your classes that need gep-spatial informations in it.
public sealed class Restaurant
{
public string Name { get; set; }
public Point Location { get; set; }
}
Supported GeoJSON objects
This libary privide an inclomple implementation of RFC 7946 at the moment. The basic geometries are supported.
Point
MultiPoint
LineString
MultiLineString
Polygon
MultiPolygon
GeometryCollection
Please refer to the documentation of RFC 7946 for details.
Serialization Support
At the moment serialization support is available for:
The serializers make sure that the objects are serialized in the GeoJSON format and in case of databases also stored im the correct format to support indexing and geo queries.
Newtonsoft.Json (JSON.NET)
To support the GeoJSON objects in JSON.NET use the UseSpatial
extension method on the JsonSerializerSettings
.
JsonSerializerSettings settings = new JsonSerializerSettings();
// Use the serialization support for GeoJSON objects.
settings.UseSpatial();
JsonConvert.DefaultSettings = () => settings;
LiteDB
To support the GeoJSON objects in LiteDB use the UseSpatial
extension method on the global BsonMapper
.
BsonMapper.Global.UseSpatial();
MongoDB
To support the GeoJSON objects in MongoDB use the UseSpatial
extension method on a ConventionPack
.
ConventionPack pack = new ConventionPack();
pack.UseSpatial();
ConventionRegistry.Register("ConventionPack", pack, t => true);
System.Text.Json
To support the GeoJSON objects in System.Text.Json use the UseSpatial
extension method on the JsonSerializerOptions
.
private JsonSerializerOptions options;
this.options = new JsonSerializerOptions
{
WriteIndented = false
};
this.options.UseSpatial();
JsonSerializer.Serialize(Point.Empty, this.options);
References
Future
We plan to add support for EFCore and OData and to add the missing pieces of the RFC Specification.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
-
net8.0
- Fluxera.Spatial (>= 9.0.0)
- MongoDB.Driver (>= 3.0.0)
-
net9.0
- Fluxera.Spatial (>= 9.0.0)
- MongoDB.Driver (>= 3.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fluxera.Spatial.MongoDB:
Package | Downloads |
---|---|
Fluxera.Repository.MongoDB
A MongoDB repository implementation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 108 | 11/14/2024 |
8.1.4 | 193 | 11/1/2024 |
8.1.3 | 396 | 7/9/2024 |
8.1.2 | 252 | 6/15/2024 |
8.1.1 | 155 | 6/12/2024 |
8.1.0 | 253 | 5/26/2024 |
8.0.7 | 105 | 5/24/2024 |
8.0.6 | 908 | 4/13/2024 |
8.0.5 | 138 | 4/13/2024 |
8.0.4 | 205 | 3/19/2024 |
8.0.3 | 355 | 2/22/2024 |
8.0.2 | 638 | 1/4/2024 |
8.0.1 | 274 | 11/23/2023 |
8.0.0 | 213 | 11/15/2023 |
7.1.6 | 266 | 7/23/2023 |
7.1.5 | 171 | 7/20/2023 |
7.1.4 | 221 | 6/21/2023 |
7.1.3 | 500 | 4/13/2023 |
7.1.2 | 321 | 3/16/2023 |
7.1.1 | 386 | 2/24/2023 |
7.1.0 | 479 | 1/18/2023 |
7.0.6 | 572 | 12/22/2022 |
7.0.5 | 337 | 12/13/2022 |
7.0.4 | 421 | 12/9/2022 |
7.0.3 | 414 | 11/15/2022 |
7.0.2 | 381 | 11/12/2022 |
7.0.0 | 336 | 11/9/2022 |
6.1.4 | 1,674 | 9/15/2022 |
6.1.3 | 648 | 7/30/2022 |
6.1.2 | 686 | 6/30/2022 |
6.1.1 | 665 | 6/15/2022 |
6.1.0 | 781 | 6/7/2022 |
6.0.9 | 1,847 | 5/28/2022 |
6.0.8 | 422 | 5/28/2022 |
6.0.7 | 1,550 | 5/5/2022 |
6.0.5 | 697 | 4/20/2022 |
6.0.4 | 1,013 | 3/26/2022 |
6.0.3 | 430 | 3/24/2022 |
6.0.2 | 465 | 2/25/2022 |