Turfano 1.0.0

dotnet add package Turfano --version 1.0.0
                    
NuGet\Install-Package Turfano -Version 1.0.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="Turfano" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Turfano" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Turfano" />
                    
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 Turfano --version 1.0.0
                    
#r "nuget: Turfano, 1.0.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 Turfano@1.0.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=Turfano&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Turfano&version=1.0.0
                    
Install as a Cake Tool

Turfano

CI NuGet NuGet

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): the Geo facade (namespace Turfano.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 via NtsConvert.ToNts/FromNts (a zero-Coordinate, packed-sequence boundary), plus a Buffer extension 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Turfano:

Package Downloads
Turfano.NetTopologySuite

NetTopologySuite interop for Turfano: the NtsConvert boundary bridge (packed, zero-Coordinate) and the NTS-backed Buffer extension.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 120 7/3/2026
1.0.0-rc.1 53 7/2/2026