91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

坐標轉換 WGS84, GCJ02, Webmercator 坐標相互轉換

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;

namespace?JZ_ShpToFile
{
????public?class?Transform
????{
????????public?static?double?PI?=?3.14159265358979324;
????????public?static?double?x_pi?=?3.14159265358979324?*?3000.0?/?180.0;

????????///?
????????///?經緯度加密轉換
????????///?

????????///?經度
????????///?緯度
????????///?轉換方式
????????///?轉換后的坐標[經度,緯度]
????????public?static?double[]?TranformCoordinate(double?xLon?double?yLat?String?Standard)
????????{
????????????double[]?result?=?new?double[]?{?yLat?xLon?};//最后會轉變成經度?緯度的順序
????????????switch?(Standard)
????????????{
????????????????case?“WGS84-GCJ02“:
????????????????????result?=?gcj_encrypt(yLat?xLon);
????????????????????break;
????????????????case?“GCJ02-WGS84“:
????????????????????result?=?gcj_decrypt(yLat?xLon);
????????????????????break;
????????????????case?“BD09-GCJ02“:
????????????????????result?=?bd_decrypt(yLat?xLon);
????????????????????break;
????????????????case?“GCJ02-BD09“:
????????????????????result?=?bd_encrypt(yLat?xLon);
????????????????????break;
????????????????case?“WGS84-BD09“:
????????????????????result?=?gcj_encrypt(yLat?xLon);
????????????????????result?=?bd_encrypt(result[0]?result[1]);
????????????????????break;
????????????????case?“BD09-WGS84“:
????????????????????result?=?bd_decrypt(yLat?xLon);
????????????????????result?=?gcj_decrypt(result[0]?result[1]);
????????????????????break;
????????????????case?“WGS84-Webmercator“:
????????????????????result?=?mercator_encrypt(yLat?xLon);
????????????????????break;
????????????????case?“Webmercator-WGS84“:
????????????????????result?=?mercator_decrypt(yLat?xLon);
????????????????????break;
????????????????default:
????????????????????break;
????????????}
????????????return?new?double[]?{?result[1]?result[0]?};
????????}

????????public?static?double[]?delta(double?lat?double?lon)
????????{
????????????//?Krasovsky?1940
????????????//
????????????//?a?=?6378245.0?1/f?=?298.3
????????????//?b?=?a?*?(1?-?f)
????????????//?ee?=?(a^2?-?b^2)?/?a^2;
????????????double?a?=?6378245.0;?//??a:?衛星橢球坐標投影到平面地圖坐標系的投影因子。
????????????double?ee?=?0.00669342162296594323;?//??ee:?橢球的偏心率。
????????????double?dLat?=?transformLat(lon?-?105.0?lat?-?35.0);
????????????double?dLon?=?transformLon(lon?-?105.0?lat?-?35.0);
????????????double?radLat?=?lat?/?180.0?*?PI;
????????????double?magic?=?Math.Sin(radLat);
????????????magic?=?1?-?ee?*?magic?*?magic;
????????????double?sqrtMagic?=?Math.Sqrt(magic);
????????????dLat?=?(dLat?*?180.0)?/?((a?*?(1?-?ee))?/?(magic?*?sqrtMagic)?*?PI);
????????????dLon?=?(dLon?*?180.0)?/?(a?/?sqrtMagic?*?Math.Cos(radLat)?*?PI);
????????????return?new?double[]?{?dLat?dLon?};
????????}

????????///?
????????///?WGS-84?to?GCJ-02
????????///?

????????///?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????11722??2021-01-12?14:50??Transform.cs

-----------?---------??----------?-----??----

????????????????11722????????????????????1


評論

共有 條評論