CoordinateSharp 2.15.2.1
See the version list below for details.
dotnet add package CoordinateSharp --version 2.15.2.1
NuGet\Install-Package CoordinateSharp -Version 2.15.2.1
<PackageReference Include="CoordinateSharp" Version="2.15.2.1" />
paket add CoordinateSharp --version 2.15.2.1
#r "nuget: CoordinateSharp, 2.15.2.1"
// Install CoordinateSharp as a Cake Addin #addin nuget:?package=CoordinateSharp&version=2.15.2.1 // Install CoordinateSharp as a Cake Tool #tool nuget:?package=CoordinateSharp&version=2.15.2.1
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.
Prerequisites
.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));
/***IF OTHER FORMAT IS USED SUCH AS DEGREE MINUTES SECONDS***/
//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);
/****OR****/
//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 Nuget.org. 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.
Abilities
- 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 usingTryParse()
. - 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 theGeoDate
will cause all celestial times to recalculate. Adjusting aCoordinate
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.
Guides
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.
Questions
Have a technical question, but don't feel like creating an issue? Email us at support@signatgroup.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 is compatible. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. 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 | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- No dependencies.
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- System.Reflection.TypeExtensions (>= 4.5.0)
- System.Runtime.Serialization.Formatters (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
-
.NETStandard 1.4
- NETStandard.Library (>= 1.6.1)
- System.Reflection.TypeExtensions (>= 4.5.0)
- System.Runtime.Serialization.Formatters (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
-
.NETStandard 2.0
- System.Reflection.TypeExtensions (>= 4.5.0)
- System.Runtime.Serialization.Formatters (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
-
.NETStandard 2.1
- System.Reflection.TypeExtensions (>= 4.7.0)
- System.Runtime.Serialization.Formatters (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages (7)
Showing the top 5 NuGet packages that depend on CoordinateSharp:
Package | Downloads |
---|---|
CoordinateSharp.Magnetic
CoordinateSharp magnetic data extensions. |
|
SmartThings.NETCoreWebHookSDK
Package Description |
|
DeploySoftware.LaunchPad.Shared
Shared code for LaunchPad framework. |
|
Cauca.Pidf.Models
Models for pidf |
|
Neon.HomeControl.Api
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on CoordinateSharp:
Repository | Stars |
---|---|
BartoszCichecki/LenovoLegionToolkit
Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
|
|
the-paid-actor/dcs-dtc
|
|
wubbl0rz/FiatChamp
FIAT (uconnect) Home Assistant Addon 🚗
|
Version | Downloads | Last updated |
---|---|---|
3.1.1.1 | 155 | 11/17/2024 |
2.24.2.1 | 35,547 | 7/14/2024 |
2.23.1.1 | 15,994 | 5/19/2024 |
2.22.1.1 | 31,708 | 2/20/2024 |
2.21.1.1 | 44,327 | 12/3/2023 |
2.20.1.1 | 22,207 | 10/2/2023 |
2.19.1.1 | 108,735 | 7/26/2023 |
2.18.1.1 | 56,586 | 5/7/2023 |
2.17.1.1 | 40,052 | 3/26/2023 |
2.16.1.1 | 31,743 | 2/26/2023 |
2.15.2.1 | 57,026 | 12/13/2022 |
2.14.2.1 | 49,256 | 9/24/2022 |
2.13.1.1 | 101,638 | 4/7/2022 |
2.12.1.1 | 163,983 | 9/27/2021 |
2.11.1.1 | 236,253 | 7/5/2021 |
-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.