Fluxera.Spatial
8.1.3
Prefix Reserved
See the version list below for details.
dotnet add package Fluxera.Spatial --version 8.1.3
NuGet\Install-Package Fluxera.Spatial -Version 8.1.3
<PackageReference Include="Fluxera.Spatial" Version="8.1.3" />
paket add Fluxera.Spatial --version 8.1.3
#r "nuget: Fluxera.Spatial, 8.1.3"
// Install Fluxera.Spatial as a Cake Addin #addin nuget:?package=Fluxera.Spatial&version=8.1.3 // Install Fluxera.Spatial as a Cake Tool #tool nuget:?package=Fluxera.Spatial&version=8.1.3
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 | net6.0 is compatible. 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 is compatible. 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 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. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Fluxera.Spatial:
Package | Downloads |
---|---|
Fluxera.Repository
A generic repository implementation. |
|
Fluxera.Spatial.SystemTextJson
A libary that provides serializer support for System.Text.Json for spatial types. |
|
Fluxera.Spatial.MongoDB
A libary that provides serializer support for MongoDB for spatial types. |
|
Fluxera.Spatial.LiteDB
A libary that provides serializer support for LiteDB spatial types. |
|
Fluxera.Spatial.JsonNet
A libary that provides serializer support for JSON.NET spatial types. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 434 | 11/14/2024 |
8.1.4 | 660 | 11/1/2024 |
8.1.3 | 554 | 7/9/2024 |
8.1.2 | 1,726 | 6/15/2024 |
8.1.1 | 349 | 6/12/2024 |
8.1.0 | 1,401 | 5/26/2024 |
8.0.7 | 190 | 5/24/2024 |
8.0.6 | 7,307 | 4/13/2024 |
8.0.5 | 290 | 4/13/2024 |
8.0.4 | 900 | 3/19/2024 |
8.0.3 | 2,539 | 2/22/2024 |
8.0.2 | 6,023 | 1/4/2024 |
8.0.1 | 1,305 | 11/23/2023 |
8.0.0 | 1,368 | 11/15/2023 |
7.1.6 | 1,083 | 7/23/2023 |
7.1.5 | 423 | 7/20/2023 |
7.1.4 | 1,043 | 6/21/2023 |
7.1.3 | 4,854 | 4/13/2023 |
7.1.2 | 1,476 | 3/16/2023 |
7.1.1 | 1,986 | 2/24/2023 |
7.1.0 | 2,941 | 1/18/2023 |
7.0.6 | 3,890 | 12/22/2022 |
7.0.5 | 642 | 12/13/2022 |
7.0.4 | 3,280 | 12/9/2022 |
7.0.3 | 1,129 | 11/15/2022 |
7.0.2 | 1,415 | 11/12/2022 |
7.0.0 | 1,089 | 11/9/2022 |
6.1.4 | 24,346 | 9/15/2022 |
6.1.3 | 4,664 | 7/30/2022 |
6.1.2 | 4,702 | 6/30/2022 |
6.1.1 | 4,731 | 6/15/2022 |
6.1.0 | 5,562 | 6/7/2022 |
6.0.9 | 11,128 | 5/28/2022 |
6.0.8 | 1,432 | 5/28/2022 |
6.0.7 | 8,478 | 5/5/2022 |
6.0.5 | 3,036 | 4/20/2022 |
6.0.4 | 5,174 | 3/26/2022 |
6.0.3 | 1,424 | 3/24/2022 |
6.0.2 | 1,460 | 2/25/2022 |