Sanchaeg 1.0.1

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

Sanchaeg

A modern .NET implementation of high-accuracy geography functions using Vincenty's formulae, including

  • calculating distance between two points,
  • calculating intersection between coordinate - bearing pairs,
  • calculating resulting coordinate for an origin, bearing and distance,
  • conversion between lat/lon and x/y coordinates using various Datums.

The also library includes various useful epsilon values for geography related calculations, and built-in values for WGS84, EPSG3857, GRS80, Airy1830, AiryModified, Intl1924 and Bessel1841 datums.

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Usage

All the complexity is hidden away behind convenient extension methods:

using Sanchaeg;

// ...

var point1 = new SanchaegGeoCoordinate
{
    Latitude = 47.438437
    Longitude = 19.252274
};

var point2 = new SanchaegGeoCoordinate
{
    Latitude = 47.6445436,
    Longitude = -122.1370065
};

var distance = point1.CalculateDistanceBetween(point2);
Console.WriteLine($"Distance: {distance} meters");

The "usual" *Coordinate types are specifically prefixed Sanchaeg in this library to make differentiation easy between whatever else *Coordinate types you might have on your end.

Thanks

This library contains many of its calculations transcoded from Chris Veness's excellent post & library, Chris Veness © 2002-$currentYear published under the MIT License.

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 was computed.  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 was computed.  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.
  • net8.0

    • No dependencies.

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.1 2,029 6/2/2025
1.0.0 236 3/19/2025