EasilyNET.Extensions 1.1.0

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 EasilyNET.Extensions --version 1.1.0
NuGet\Install-Package EasilyNET.Extensions -Version 1.1.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="EasilyNET.Extensions" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasilyNET.Extensions --version 1.1.0
#r "nuget: EasilyNET.Extensions, 1.1.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.
// Install EasilyNET.Extensions as a Cake Addin
#addin nuget:?package=EasilyNET.Extensions&version=1.1.0

// Install EasilyNET.Extensions as a Cake Tool
#tool nuget:?package=EasilyNET.Extensions&version=1.1.0
EasilyNET.Extensions
  • 希望本库能够有很多奇思妙想的方法,来填充我们的.NET 库,帮助我们更简单的使用.NET

ChangeLog:

  • 新增百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和 WGS84 坐标系之间的转换

当前互联网地图的坐标系现状

地球坐标(WGS84)
  • 国际标准,从 GPS 设备中取出的数据的坐标系
  • 国际地图提供商使用的坐标系
火星坐标(GCJ-02)也叫国测局坐标系
  • 中国标准,从国行移动设备中定位获取的坐标数据使用这个坐标系
  • 国家规定: 国内出版的各种地图系统(包括电子形式),必须至少采用 GCJ-02 对地理位置进行首次加密.
百度坐标(BD-09)
  • 百度标准,百度 SDK,百度地图,GeoCoding 使用 -(本来就乱了,百度又在火星坐标上来个二次加密)

开发过程需要注意的事

  • 从设备获取经纬度(GPS)坐标

    如果使用的是百度 sdk 那么可以获得百度坐标(bd09)或者火星坐标(GCJ02),默认是 bd09 如果使用的是 ios 的原生定位库,那么获得的坐标是 WGS84 如果使用的是高德 sdk,那么获取的坐标是 GCJ02

  • 互联网在线地图使用的坐标系

    火星坐标系:
    

    iOS 地图(其实是高德) Google 国内地图(.cn 域名下) 搜搜、阿里云、高德地图、腾讯百度坐标系: 当然只有百度地图 WGS84 坐标系: 国际标准,谷歌国外地图、osm 地图等国外的地图一般都是这个

// 测试经纬度问题
CoordinateConvert.BD09ToGCJ02(116.404, 39.915, out var gcjLon, out var gcjLat);
CoordinateConvert.GCJ02ToBD09(116.404, 39.915, out var bdLon, out var bdLat);
CoordinateConvert.WGS84ToGCJ02(116.404, 39.915, out var gcjLon2, out var gcjLat2);
CoordinateConvert.GCJ02ToWGS84(116.404, 39.915, out var wgsLon, out var wgsLat);
Console.WriteLine($"百度经纬度坐标转国测局坐标,经度:{gcjLon},纬度:{gcjLat}");
Console.WriteLine($"国测局坐标转百度经纬度坐标,经度:{bdLon},纬度:{bdLat}");
Console.WriteLine($"WGS84转国测局坐标,经度:{gcjLon2},纬度:{gcjLat2}");
Console.WriteLine($"国测局坐标转WGS84坐标,经度:{wgsLon},纬度:{wgsLat}");
// 百度经纬度坐标转国测局坐标,经度:116.39762729119315,纬度:39.90865673957631
// 国测局坐标转百度经纬度坐标,经度:116.41036949371029,纬度:39.92133699351021
// WGS84转国测局坐标,经度:116.41024449916938,纬度:39.91601738120746
// 国测局坐标转WGS84坐标,经度:116.39775550083061,纬度:39.91398261879254

更多具体扩展这里就不详细写了,参考源代码.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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 is compatible.  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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated