Turfano.NetTopologySuite
1.0.0
dotnet add package Turfano.NetTopologySuite --version 1.0.0
NuGet\Install-Package Turfano.NetTopologySuite -Version 1.0.0
<PackageReference Include="Turfano.NetTopologySuite" Version="1.0.0" />
<PackageVersion Include="Turfano.NetTopologySuite" Version="1.0.0" />
<PackageReference Include="Turfano.NetTopologySuite" />
paket add Turfano.NetTopologySuite --version 1.0.0
#r "nuget: Turfano.NetTopologySuite, 1.0.0"
#:package Turfano.NetTopologySuite@1.0.0
#addin nuget:?package=Turfano.NetTopologySuite&version=1.0.0
#tool nuget:?package=Turfano.NetTopologySuite&version=1.0.0
Turfano
A faithful .NET port of TurfJS — the geospatial analysis library — with its own GeoJSON types, its own typed quantities, and zero external dependencies in the core package.
Packages
Turfano(core): theGeofacade (namespaceTurfano.GeoJson), a faithful port of the@turf/*function index —Distance,Bearing,Area,Union,Buffer(via satellite),Voronoi,Isolines, and dozens more — over its own GeoJSON record types (Point,Polygon,Position, ...) and its own typed quantities (Turfano.Units.Length/Area/Angle). No NetTopologySuite, no UnitsNet — AOT and trimming friendly.Turfano.NetTopologySuite(satellite): bridges Turfano's GeoJSON types to NetTopologySuite's viaNtsConvert.ToNts/FromNts(a zero-Coordinate, packed-sequence boundary), plus aBufferextension implemented on top of NTS (the one operation that genuinely needs a full planar geometry engine).
Why a from-scratch port instead of building on NetTopologySuite?
NTS is a superb topology engine, but TurfJS's function surface and ergonomics
(bearing, destination, along, midpoint, area, union, voronoi,
isolines/isobands, ...) don't map cleanly onto it, and porting on top of NTS meant
carrying NTS + UnitsNet as mandatory dependencies just to get TurfJS-shaped APIs. Turfano
now ports each @turf function faithfully — same algorithm, same edge cases, same
expected outputs, checked against the real TurfJS sources in reference/ — directly over
plain GeoJSON types you can serialize as-is.
Quick start
using Turfano.GeoJson;
var origin = new Position(-122.4194, 37.7749);
var destination = new Position(-122.4094, 37.7849);
var distance = Geo.Distance(origin, destination); // Turfano.Units.Length
Console.WriteLine($"{distance.Kilometers:F3} km");
var square = Geo.Polygon(
[new Position(0, 0), new Position(1, 0), new Position(1, 1), new Position(0, 1), new Position(0, 0)]
);
var area = Geo.Area(square); // Turfano.Units.Area
Console.WriteLine($"{area.SquareMeters:F1} m²");
var overlappingSquare = Geo.Polygon(
[new Position(0.5, 0.5), new Position(1.5, 0.5), new Position(1.5, 1.5), new Position(0.5, 1.5), new Position(0.5, 0.5)]
);
var union = Geo.Union(square, overlappingSquare); // Turfano.GeoJson.Geometry?
Interop with NetTopologySuite
Need actual NTS geometries — to interoperate with an NTS-based stack, or to run
Buffer — add the Turfano.NetTopologySuite package:
using Turfano.NetTopologySuite;
var buffered = square.Buffer(Turfano.Units.Length.FromKilometers(10)); // @turf/buffer
var ntsGeometry = NtsConvert.ToNts(square);
var backToTurfano = NtsConvert.FromNts(ntsGeometry);
Status
Pre-1.0 (1.0.0-rc.1). The Geo facade covers the full @turf function index; the API
may still evolve before 1.0.0. Targets net8.0, net9.0 and net10.0.
Third-party attributions
Turfano ports algorithms from TurfJS, polyclip-ts, splaytree-ts, earcut and d3-voronoi.
See NOTICE for the full attributions and licenses.
Development
See CLAUDE.md for build/test commands and repository conventions.
| 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. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- NetTopologySuite (>= 2.5.0)
- Turfano (>= 1.0.0)
-
net8.0
- NetTopologySuite (>= 2.5.0)
- Turfano (>= 1.0.0)
-
net9.0
- NetTopologySuite (>= 2.5.0)
- Turfano (>= 1.0.0)
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 |
|---|---|---|
| 1.0.0 | 99 | 7/3/2026 |
| 1.0.0-rc.1 | 58 | 7/2/2026 |