Fluxera.Spatial.JsonNet 7.1.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Fluxera.Spatial.JsonNet --version 7.1.1                
NuGet\Install-Package Fluxera.Spatial.JsonNet -Version 7.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fluxera.Spatial.JsonNet" Version="7.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fluxera.Spatial.JsonNet --version 7.1.1                
#r "nuget: Fluxera.Spatial.JsonNet, 7.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Fluxera.Spatial.JsonNet as a Cake Addin
#addin nuget:?package=Fluxera.Spatial.JsonNet&version=7.1.1

// Install Fluxera.Spatial.JsonNet as a Cake Tool
#tool nuget:?package=Fluxera.Spatial.JsonNet&version=7.1.1                

Build Status

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

RFC 7946

Future

We plan to add support for EFCore and OData and to add the missing pieces of the RFC Specification.

Product Compatible and additional computed target framework versions.
.NET 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.1.4 62 11/1/2024
8.1.3 349 7/9/2024
8.1.2 111 6/15/2024
8.1.1 105 6/12/2024
8.1.0 93 5/26/2024
8.0.7 104 5/24/2024
8.0.6 114 4/13/2024
8.0.5 106 4/13/2024
8.0.4 115 3/19/2024
8.0.3 111 2/22/2024
8.0.2 182 1/4/2024
8.0.1 177 11/23/2023
8.0.0 130 11/15/2023
7.1.6 182 7/23/2023
7.1.5 148 7/20/2023
7.1.4 155 6/21/2023
7.1.3 166 4/13/2023
7.1.2 238 3/16/2023
7.1.1 262 2/24/2023
7.1.0 306 1/18/2023
7.0.6 302 12/22/2022
7.0.5 288 12/13/2022
7.0.4 277 12/9/2022
7.0.3 327 11/15/2022
7.0.2 358 11/12/2022
7.0.0 330 11/9/2022
6.1.4 454 9/15/2022
6.1.3 403 7/30/2022
6.1.2 423 6/30/2022
6.1.1 429 6/15/2022
6.1.0 424 6/7/2022
6.0.9 441 5/28/2022
6.0.8 425 5/28/2022
6.0.7 448 5/5/2022
6.0.5 456 4/20/2022
6.0.4 449 3/26/2022
6.0.3 419 3/24/2022
6.0.2 438 2/25/2022