GeographicLib.NET 1.51.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package GeographicLib.NET --version 1.51.0
NuGet\Install-Package GeographicLib.NET -Version 1.51.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="GeographicLib.NET" Version="1.51.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GeographicLib.NET --version 1.51.0
#r "nuget: GeographicLib.NET, 1.51.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.
// Install GeographicLib.NET as a Cake Addin
#addin nuget:?package=GeographicLib.NET&version=1.51.0

// Install GeographicLib.NET as a Cake Tool
#tool nuget:?package=GeographicLib.NET&version=1.51.0

GeographicLib.NET

master develop

GeographicLib.NET is a native .NET implementation of GeographicLib written in pure C#.

What's different from NETGeographicLib

Unlike the original NETGeographicLib, GeographicLib.NET is implemented in pure C# without binding the original C++ GeograpbicLib library by using C++/CLI or P/Invoke, thus achieves higher level of portability.

You should be able to use GeographicLib.NET with any target framework and platform that supports .NET Standard 2.0 or above.

Features

Bellow is a list of planned and implemented features.

  • Projections (AlbersEqualArea, AzimuthalEquidistant, CassiniSoldner, Gnomonic, LambertConformalConic, PolarStereographic and TransverseMercator)
  • Geocodes (GARS, Geohash, Georef, MGRS and OSGB)
  • Coordinate conversions (UTMUPS, Geocentric and LocalCartesian)
  • Coordinate parsing/formatting (DMS and GeoCoords)
  • Geodesic (Geodesic, GeodesicLine, GeodesicExact and GeodesicLineExact)
  • Rhumb (Rhumb, RhumbLine)
  • PolygonArea (PolygonArea<T>, PolygonArea, PolygonAreaExact and PolygonAreaRhumb)
  • Geoid (Geoid)
  • GravityModel (GravityCircle, NormalGravity and GravityModel)
  • MagneticModel (MagneticModel, MagneticCircle)
  • Auxilary classes (MathEx, Ellipoid, EllipticFunction and SphericalHarmonic)

Geodesic and GeodesicExact are tested with the test set for geodesic.

TransverseMercator and TransverseMercatorExact are tested with data generated by 64-bit TransverseMercatorProj utility ran on Windows.

Managed implemetation of C mathematical functions in MathEx are tested with data generated by 64-bit Windows Universal C Runtime.

Installing

Stable Release

Stable releases of GeographicLib.NET are hosted on NuGet. You can install them using the following command:

dotnet add package GeographicLib.NET

Preview Preview

Preview versions of GeographicLib.NET are hosted on NuGet pre-release channel. You can install them using the following command:

dotnet add package GeographicLib.NET --prerelease

Mathematical Functions

GeographicLib uses several C mathematical functions that are not present in or not available in all versions of .NET. These functions are:

  • remquo
  • hypot
  • log1p
  • expm1
  • frexp
  • fma (available since .NET 5.0)
  • scalbn (available since .NET 5.0)
  • copysign (available since .NET 5.0)
  • atanh (available since .NET Standard 2.1)
  • asinh (available since .NET Standard 2.1)
  • cbrt (available since .NET Standard 2.1)

GeographicLib.NET provides managed implemetations of these functions (ported from musl libc).

GeographicLib.MathEx class will use implemetations provided by .NET runtime whenenver possible, and will fallback to managed implemetations when not available in .NET runtime.

You can also force GeographicLib.MathEx to fallback to native implemations provided by system C runtime libraries, rather than managed implementaions, by setting GeographicLib.MathEx.UseManagedCMath property to false. These functions provide better performance, but may produce completely different results in some edge cases.

Documentation

GeographicLib.NET includes a detailed XML documentation for all public APIs. Since the API surface of GeographicLib.NET is highly compatible with the original GeographicLib, you can also refer the original documentation here for usage and explanation.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 (1)

Showing the top 1 popular GitHub repositories that depend on GeographicLib.NET:

Repository Stars
drewnoakes/metadata-extractor-dotnet
Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Version Downloads Last updated
2.3.1 4,780 3/20/2024
2.3.0 3,346 2/23/2024
2.1.2 49,589 1/17/2023
2.0.0 6,211 8/24/2022
1.52.1 6,974 4/12/2022
1.52.0 22,508 7/7/2021
1.51.0 5,024 3/14/2021