Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

Geo

> 编程语言
Open source

A geospatial library for .NET

192 stars0 likes2 views
WebsiteGitHub

About

A geospatial library for .NET

Geo — a geospatial library for .NET

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
  • Quick start
  • Features
  • Conventions
  • Building from source
  • Contributing
  • License

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:

bash
dotnet add package Geo

Quick start

…

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 ✓

Links are read and written for both versions - GpsData, Waypoint, Route and Track each expose a Links collection of GpsLink (href, text, media type). GPX 1.1 allows any number; GPX 1.0 has a single / pair, so writing 1.0 keeps the first.

GPX extensions are read and written for both versions, so vendor content such as Garmin's gpxx or the Topografix gpx_style line styling survives a round-trip. GpsData, Track, TrackSegment, Route and Waypoint each expose the foreign content of their element as XElements:

csharp
XNamespace style = "http://www.topografix.com/GPX/gpx_style/0/2";

var colour = data.Tracks[0]
    .Extensions.FirstOrDefault(x => x.Name == style + "line")
    ?.Element(style + "color")?.Value;

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:

bash
./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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言