Geo 2.0.0

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

Geo

Geo — a geospatial library for .NET

NuGet Downloads License: LGPL-3.0-or-later

Geo is a spatial library for .NET built specifically for geographic data — coordinates on the surface of the Earth — rather than planar/projected data. It provides geometry and GPS types, serializers for common spatial and GPS file formats, and geodetic and geomagnetic calculations.

Wondering how it compares to NetTopologySuite? See Geo vs. NetTopologySuite.

Documentation · Changelog · Issues · NuGet

Contents

Installation

Geo targets .NET Standard 2.0, so it runs on .NET 5+, .NET Core 2.0+, and .NET Framework 4.6.1+. Install it from NuGet:

dotnet add package Geo

Quick start

using Geo;
using Geo.Geometries;
using Geo.Geodesy;
using Geo.IO.Wkt;
using Geo.IO.GeoJson;
using Geo.Measure;

// Ordinate order is latitude, longitude — all ordinates are in degrees.
var london = new Coordinate(51.5074, -0.1278);
var newYork = new Coordinate(40.7128, -74.0060);

// Distance and bearing along the great-circle (shortest) line.
GeodeticLine line = london.CalculateShortestLine(newYork);
double km = line.Distance.ConvertTo(DistanceUnit.Km).Value;   // ~5570 km
double initialBearing = line.Bearing12;                       // degrees

// Serialize a geometry to WKT and GeoJSON.
var point = new Point(london);
string wkt = new WktWriter().Write(point);                    // "POINT (-0.1278 51.5074)"
string geoJson = new GeoJsonWriter().Write(point);

// Parse it back from WKT.
IGeometry parsed = new WktReader().Read(wkt);

Features

Geometry types

  • Point
  • LineString, LinearRing
  • Polygon, Triangle
  • Circle
  • GeometryCollection, MultiPoint, MultiLineString, MultiPolygon

Coordinates come in four flavours: Coordinate (lat/lon), CoordinateZ (with elevation), CoordinateM (with a measure), and CoordinateZM (both).

GPS types

  • GpsData, Route, Track, Waypoint

Serialize / deserialize geometries

Format Read Write
WKT (Well-Known Text)
WKB (Well-Known Binary)
GeoJSON

Don't know a string's format up front? GeoFormat.Detect / GeoFormat.TryParse sniff whether it is a coordinate pair, WKT, or GeoJSON and parse it — see the parsing guide.

Serialize / deserialize GPS files

Format Read Write
GPX (1.0 & 1.1)
NMEA
IGC
Garmin flightplan
SkyDemon flightplan
PocketFMS flightplan

Geographic calculations

  • Distance and bearing
  • Area
  • Great-circle lines
  • Rhumb lines

Geomagnetism calculations

  • IGRF and WMM models (through 2025)
  • Declination, inclination, intensity, and more

Conventions

  • All ordinates are in degrees, unless specified otherwise.
  • All measurements are in S.I. units (metres, seconds, etc.), unless specified otherwise.
  • The coordinate reference system is assumed to be WGS-84.
  • Ordinate order in constructors is latitude, longitude (e.g. new Coordinate(lat, lon)).

Building from source

The project uses NUKE for build automation. Use the bootstrap scripts, which pin the SDK and run the same targets as CI:

./build.sh            # compile (default target)
./build.sh Test       # build and run tests

On Windows, use build.cmd / build.ps1. See AGENTS.md for a full description of the repository layout, build targets, and coding conventions.

Contributing

Issues and pull requests are welcome. Formatting is enforced by CSharpier and checked in CI — run dotnet csharpier format . before committing (a pre-commit hook does this for staged files). New library code must remain compatible with .NET Standard 2.0.

License

Geo is licensed under the terms of the GNU Lesser General Public License, version 3 or later (LGPL-3.0-or-later), as published by the Free Software Foundation. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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.  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. 
.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 was computed. 
.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.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Geo:

Package Downloads
Geo.Raven

RavenDB Client Integration for Geo

RavenDB.Client.Spatial.Geo

GeoJSON and WKT JsonConverters for RavenDB and Geo.

SunamoGpx

Geocoding and more

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 404 8/4/2026
1.2.0 333,815 6/17/2025
1.1.1 316,277 1/3/2025
1.0.2 273,658 10/2/2024
1.0.1 308,941 3/4/2023
1.0.0 597,235 5/22/2020
0.20.0 275,760 2/14/2020
0.14.1 446,156 4/9/2016
0.14.0 264,899 12/29/2015
0.13.0 271,239 8/18/2015
0.12.2 266,009 1/10/2015
0.12.1 263,451 11/5/2014
0.12.0 264,343 10/31/2014
0.11.4 263,173 9/5/2014
0.11.3 263,272 5/12/2014
0.11.2 265,987 12/29/2013
0.11.1 262,804 12/29/2013
0.11.0 286,694 11/17/2013
Loading failed