Other

项目介绍

Tronald/CoordinateSharp 是一个托管在 GitHub 上的开源项目,主要使用 C# 编写,采用 Other 许可证,目前获得 386 个 Star、56 次 Fork。

仓库全名
Tronald/CoordinateSharp
开源许可证
Other
Star 数
386
Fork 数
56
未关闭 Issue
2

README 摘要

Romans 10:9 (NIV) “If you declare with your mouth, 'Jesus is Lord,' and believe in your heart that God raised him from the dead, you will be saved.” CoordinateSharp is a simple .NET library written in C# that is designed to assist with geographic coordinate conversions, parsing, formatting, magnetic data, and location based celestial calculations such as sunset, sunrise, moonset, moonrise and more. Like…

完整内容见 GitHub 原始 README 或本页 。

常见问题

CoordinateSharp 用什么语言开发?

主要使用 C# 编写,采用 Other 许可证,目前有 386 个 Star。

CoordinateSharp 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 CoordinateSharp 的源码?

可以直接克隆仓库:git clone https://github.com/Tronald/CoordinateSharp.git,默认分支为 master;安装与运行步骤见仓库 README。

CoordinateSharp 最近还在维护吗?

仓库最近一次更新为 8月24日,当前有 2 个未关闭 Issue;Star 数为 386,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A library designed to ease geographic coordinate format conversions, and determine sun/moon information in C#

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

C#

README

Romans 10:9 (NIV)
“If you declare with your mouth, ‘Jesus is Lord,’ and believe in your heart that God raised him from the dead, you will be saved.”



CoordinateSharp is a simple .NET library written in C# that is designed to assist with geographic coordinate conversions, parsing, formatting, magnetic data, 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.

Installing

CoordinateSharp is available as a nuget package from nuget.org

Alternatively, you may download the library directly on our website

Licensing & Purchase

CoordinateSharp is split licensed. You may use CoordinateSharp for free under the AGPL-3.0 (requires software to be open source) or a commercial use license that absolves you of the AGPL-3.0 open source requirements. Details as well as pricing may be viewed on our website.

Usage Example

CoordinateSharp is simple to use. In the below example we can 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));

//OR simply parse from a string
Coordinate c = Coordinate.Parse("N 47º 36.372' W 122º 19.926'", 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 using TryParse().
  • Distance calculation: Calculate distances between coordinates.
  • 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, or next solar eclipse 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.
  • Magnetic Data: Determine geographic magnetic data such as declination (requires extension package).

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.

Support

Commercial subscription based license holders may receive direct support by emailing us at [email protected]. All others may create an issue at anytime.

评论

暂无评论