Marqdouj.DotNet.Web.JsInterop.GeoJson 10.7.0

Prefix Reserved
dotnet add package Marqdouj.DotNet.Web.JsInterop.GeoJson --version 10.7.0
                    
NuGet\Install-Package Marqdouj.DotNet.Web.JsInterop.GeoJson -Version 10.7.0
                    
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="Marqdouj.DotNet.Web.JsInterop.GeoJson" Version="10.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marqdouj.DotNet.Web.JsInterop.GeoJson" Version="10.7.0" />
                    
Directory.Packages.props
<PackageReference Include="Marqdouj.DotNet.Web.JsInterop.GeoJson" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marqdouj.DotNet.Web.JsInterop.GeoJson --version 10.7.0
                    
#r "nuget: Marqdouj.DotNet.Web.JsInterop.GeoJson, 10.7.0"
                    
#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.
#:package Marqdouj.DotNet.Web.JsInterop.GeoJson@10.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marqdouj.DotNet.Web.JsInterop.GeoJson&version=10.7.0
                    
Install as a Cake Addin
#tool nuget:?package=Marqdouj.DotNet.Web.JsInterop.GeoJson&version=10.7.0
                    
Install as a Cake Tool

DotNet.Web.JsInterop.GeoJson

A .NET library for working with GeoJSON data in JavaScript interop scenarios.

Features

  • Provides a set of classes and methods for parsing, manipulating, and generating GeoJSON data.
  • Supports various GeoJSON types, including Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature, and FeatureCollection.

Serialization

  • All GeoJSON types can be serialized to JSON format using the built-in System.Text.Json library, except GeometryCollection which requires special handling.
    • A default ToJson method is provided for each type.
    • GeometryCollection. This type requires special handling during serialization, as it contains a collection of geometries that can be of any GeoJSON type. The default ToJson method implements the requirements to correctly serialize a GeometryCollection.

Deserialization

  • All GeoJSON types can be serialized to JSON format using the built-in System.Text.Json library, except GeometryCollection which requires special handling.
  • A default FromJson method is provided for each type.
  • GeometryCollection. This type requires special handling during deserialization, as it contains a collection of geometries that can be of any GeoJSON type. The default FromJson method implements the requirements to correctly deserialize a GeometryCollection.

Usage

  • See the Sandbox project in the source code for examples of how to use the library in a Blazor application.

Release Notes

  • v10.7.0

    • GeoJsonProperties. A second constructor has been added that allows you to specify StringComparer.
  • v10.6.2

    • Feature.Id. Default is now a Guid string.
  • v10.6.1

    • IFeature. Add Id to interface.
  • v10.6.0

    • Pixel/IPixel. New object/interface for a Pixel.
  • v10.5.2

    • Interfaces. Added interfaces to all IGeoJSON objects to identify their specific types.
      • Helps with type checking and casting of types, especially when working with c# Generics.
      • The new interfaces are:
        • IFeature, IFeature{G, P}: IFeature where G : Geometry.
        • IFeatureCollection, IFeatureCollection{G, P} : IFeatureCollection where G : Geometry.
        • IGeometryCollection.
        • ILineString.
        • IMultiLineString.
        • IMultiPoint.
        • IMultiPolygon.
        • IPoint.
        • IPolygon.
        • IPosition.
  • v10.5.1

    • IGeoJsonObject. Interface added to identify objects that derive from GeoJsonObject.
      • Helps with type checking and casting of types, especially when working with c# Generics.
    • IGeoJSON. Interface added to identify objects used in GeoJSON operations. Includes Position, IGeoJsonObject and IGeometry.
      • Helps with type checking and casting of types, especially when working with c# Generics.
  • v10.5.0

    • IGeometry interface added to the Geometry base class. Helps with type checking and casting of geometry types, especially when working with c# Generics.
  • v10.4.0

    • Update NuGet packages.
  • v10.3.1

    • Position. Added ToString(string format) method.
  • v10.3.0

    • Changed method signature FeatureCollection<T, GeoJsonProperties>? FromJson<T> to FeatureCollection<T, P>? FromJson<T>.
  • v10.2.1

    • Update NuGet packages.
  • v10.2.0

    • Added interface IBoundingBoxEdit for editing BoundingBox instances.
  • v10.1.1

    • Update NuGet packages.
  • v10.1.0

    • Position. Longitude, Latitude, and Elevation have been changed to full properties.
  • v10.0.0. Initial release with basic GeoJSON parsing and generation capabilities.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Marqdouj.DotNet.Web.JsInterop.GeoJson:

Package Downloads
Marqdouj.DotNet.Web.JsInterop.Azure.Maps

Designed for Blazor interaction with the Azure Maps SDK

Marqdouj.DotNet.Web.JsInterop.Azure.Maps.Atlas

Designed for JSInterop interaction with the Azure Maps SDK

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.7.0 125 9/21/2026
10.6.2 97 9/21/2026
10.6.1 105 9/15/2026
10.6.0 141 9/11/2026