.NET 5.0 .NET Standard 1.3 .NET Framework 4.0
This is a prerelease version of CoordinateSharp.
There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package CoordinateSharp --version
NuGet\Install-Package CoordinateSharp -Version
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="CoordinateSharp" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoordinateSharp --version
#r "nuget: CoordinateSharp,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CoordinateSharp as a Cake Addin
#addin nuget:?package=CoordinateSharp&version=

// Install CoordinateSharp as a Cake Tool
#tool nuget:?package=CoordinateSharp&version=

CoordinateSharp is a simple .NET library that is designed to assist with geographic coordinate conversions, formatting and location based celestial calculations such as sunset, sunrise, moonset, moonrise and more.

Like CoordinateSharp? Tell us about it!

This library was built to help other developers. Please make the time and effort worth while by telling us what you are using it for.


.NET 4.0+ Framework, .NET 5.0+, or .NET Standard 1.3+ compatible runtimes.

Licensing & Purchase

CoordinateSharp is split licensed. You may use CoordinateSharp under the AGPL3.0 or a Commercial Use License that absolves you of the AGPL3.0 requirements. Details as well as pricing may be viewed on our website

Usage Example

CoordinateSharp is simple to use. In the below example we create a Coordinate using one of the methods below.

//Seattle coordinates on 5 Jun 2018 @ 10:10 AM (UTC)
//Signed-Decimal Degree    47.6062, -122.3321
//Degrees Minutes Seconds  N 47º 36' 22.32" W 122º 19' 55.56"


//Initialize with signed degree (standard method)
Coordinate c = new Coordinate(47.6062, -122.3321, new DateTime(2018,6,5,10,10,0));


//Initialize with TryParse() Method
Coordinate.TryParse("N 47º 36' 22.32\" W 122º 19' 55.56\"", new DateTime(2018,6,5,10,10,0), out c);


//Initialize with Secondary Method
Coordinate c = new Coordinate();
c.Latitude = new CoordinatePart(47,36, 22.32, CoordinatePosition.N, c);
c.Longitude = new CoordinatePart(122, 19, 55.56, CoordinatePosition.W, c);
c.GeoDate = new DateTime(2018,6,5,10,10,0);

Once the Coordinate is created we have access to various formats and celestial data. Here are just a few examples.

Console.WriteLine(c);                              // N 47º 36' 22.32" W 122º 19' 55.56"
Console.WriteLine(c.Latitude.Seconds);             // 22.32
Console.WriteLine(c.UTM);                          // 10T 550200mE 5272748mN

Console.WriteLine(c.CelestialInfo.SunSet);         // 5-Jun-2018 4:02:00 AM
Console.WriteLine(c.CelestialInfo.MoonAltitude);   // 14.4169966277874

Extension Packages

Extension packages are being built to work in conjunction with CoordinateSharp. Currently available extension packages may be downloaded via Documentation for extension packages is contained in the main documentation of the library and can be found on our website.

  • CoordinateSharp.Magnetic - Calculate location based magnetic field elements.

Performance Tips

CoordinateSharp's ease of use comes from its eager loaded architecture. This approach may come at the cost of performance at times, but luckily the eager loading of certain properties can be turned off to improve benchmarks. For example if you only need MGRS conversions, you can turn off celestial calculations and improve Coordinate initialization by 6-10ms.

It is highly recommended that developers reference our Performance Tips Page once they have become familiar with the basic usage of CoordinateSharp.


  • Lat/Long formatting: Quickly format how a coordinate is output.
  • Coordinate conversions: Convert Geodetic Latitude / Longitude to UTM, MGRS, Cartesian (Spherical and ECEF), Web Mercator (EPSG:3857), GEOREF or vice versa.
  • Coordinate parsing: Initialize a Coordinate with multiple format types using TryParse().
  • Coordinate moving/shifting: Shift coordinates using a distance and bearing, or a distance and target coordinate.
  • Location based celestial information: Quickly determine sun set, moon rise, next solar eclipse or even zodiac signs at the input location.
  • Property change notification: All properties automatically adjust as the Coordinate changes. For example, changing the GeoDate will cause all celestial times to recalculate. Adjusting a Coordinate latitudinal seconds, will retrigger all coordinate conversions and celestial data so your information is always up to date.
  • Geo-Fencing: Define a perimeter and determine if your coordinate is within or near polylines.


Check out the CoordinateSharp Developer Guide for more detailed instructions on the usage and abilities of CoordinateSharp.

You may also view the Documentation for a more in depth look at CoordinateSharp's structure.

Change notes can be viewed here.


Have a technical question, but don't feel like creating an issue? Email us at

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on CoordinateSharp:

Package Downloads

Package Description


Shared code for LaunchPad framework.


CoordinateSharp magnetic data extensions.


Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on CoordinateSharp:

Repository Stars
Lightweight replacement of Lenovo Vantage for Lenovo Legion laptops.
Version Downloads Last updated 6,340 12/13/2022 19,597 9/24/2022 45,667 4/7/2022 98,076 9/27/2021 111,604 7/5/2021 20,350 5/31/2021 35,709 3/15/2021 9,095 2/13/2021 8,735 1/22/2021 18,865 12/18/2020 12,125 12/3/2020 11,961 10/14/2020 14,142 9/1/2020 2,813 8/17/2020 16,305 7/13/2020 8,302 6/19/2020 6,105 6/1/2020 7,590 5/5/2020 8,210 3/31/2020 10,025 3/1/2020 2,848 2/2/2020 5,284 1/2/2020 11,431 11/5/2019 6,609 10/9/2019 8,620 8/30/2019

-Adds GEOREF conversions (for use in legacy systems). Benchmark changes minimal, but may slightly impact performance in certain performance sensitive use cases. Eager Loading settings may need to be adjusted for users that prefer Lazy Loading.
-Adds .NET 7.0 targets.
-Add ability to restrict parsable formats.
-Fixes parse bug impacting ECEF format parsed coordinates with Eager Loading turned off.
-Add global default parse format settings.
-Documentation fixes.