Fluxera.Spatial.SystemTextJson
6.0.7
Prefix Reserved
See the version list below for details.
dotnet add package Fluxera.Spatial.SystemTextJson --version 6.0.7
NuGet\Install-Package Fluxera.Spatial.SystemTextJson -Version 6.0.7
<PackageReference Include="Fluxera.Spatial.SystemTextJson" Version="6.0.7" />
paket add Fluxera.Spatial.SystemTextJson --version 6.0.7
#r "nuget: Fluxera.Spatial.SystemTextJson, 6.0.7"
// Install Fluxera.Spatial.SystemTextJson as a Cake Addin #addin nuget:?package=Fluxera.Spatial.SystemTextJson&version=6.0.7 // Install Fluxera.Spatial.SystemTextJson as a Cake Tool #tool nuget:?package=Fluxera.Spatial.SystemTextJson&version=6.0.7
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 shure 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 | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Fluxera.Spatial (>= 6.0.7)
- JetBrains.Annotations (>= 2022.1.0)
- System.Text.Json (>= 6.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Fluxera.Spatial.SystemTextJson:
Package | Downloads |
---|---|
Fluxera.Extensions.Hosting.Modules.AspNetCore
A module that enables ASP.NET Core. |
|
Fluxera.Extensions.Hosting.Modules.Messaging
A module that enables messaging based on MassTransit. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.1.3 | 101 | 7/9/2024 |
8.1.2 | 1,051 | 6/15/2024 |
8.1.1 | 96 | 6/12/2024 |
8.1.0 | 913 | 5/26/2024 |
8.0.7 | 114 | 5/24/2024 |
8.0.6 | 5,333 | 4/13/2024 |
8.0.5 | 125 | 4/13/2024 |
8.0.4 | 606 | 3/19/2024 |
8.0.3 | 1,766 | 2/22/2024 |
8.0.2 | 4,484 | 1/4/2024 |
8.0.1 | 764 | 11/23/2023 |
8.0.0 | 1,037 | 11/15/2023 |
7.1.6 | 703 | 7/23/2023 |
7.1.5 | 152 | 7/20/2023 |
7.1.4 | 641 | 6/21/2023 |
7.1.3 | 3,233 | 4/13/2023 |
7.1.2 | 838 | 3/16/2023 |
7.1.1 | 1,356 | 2/24/2023 |
7.1.0 | 2,005 | 1/18/2023 |
7.0.6 | 2,580 | 12/22/2022 |
7.0.5 | 292 | 12/13/2022 |
7.0.4 | 1,921 | 12/9/2022 |
7.0.3 | 326 | 11/15/2022 |
7.0.2 | 327 | 11/12/2022 |
7.0.0 | 323 | 11/9/2022 |
6.1.4 | 16,639 | 9/15/2022 |
6.1.3 | 2,382 | 7/30/2022 |
6.1.2 | 2,388 | 6/30/2022 |
6.1.1 | 2,402 | 6/15/2022 |
6.1.0 | 2,468 | 6/7/2022 |
6.0.9 | 426 | 5/28/2022 |
6.0.8 | 409 | 5/28/2022 |
6.0.7 | 423 | 5/5/2022 |
6.0.5 | 448 | 4/20/2022 |
6.0.4 | 428 | 3/26/2022 |
6.0.3 | 414 | 3/24/2022 |
6.0.2 | 423 | 2/25/2022 |