資源簡介
對于中國一張地圖進行蘭勃特投影變換,世界的地圖進行墨卡托投影變換。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Collections;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Drawing.Drawing2D;
using?System.Windows.Forms;
using?System.IO;
using?Microsoft.VisualBasic;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
namespace?project
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????class?Lines
????????{
????????????public?int?ID;
????????????public?List?point?=?new?List();
????????}
????????class?Maps
????????{
????????????public?List?Lines?=?new?List();
????????????public?Maps(Lines?line)
????????????{
????????????????Lines.Add(line);
????????????}
???????????
????????????public?Maps(String?path)
????????????{
????????????????StreamReader?sr?=?new?StreamReader(path);
????????????????String?a;
????????????????int?endNum?=?0;
????????????????Lines?line?=?new?Lines();
????????????????while?(true)
????????????????{
????????????????????a?=?sr.ReadLine();
????????????????????if?(a?==?“end“?||?a?==?“END“)
????????????????????{
????????????????????????if?(++endNum?==?2)
????????????????????????{
????????????????????????????break;
????????????????????????}
????????????????????????Lines.Add(line);
????????????????????????line?=?new?Lines();
????????????????????????continue;
????????????????????}
????????????????????endNum?=?0;
????????????????????String[]?temp?=?a.Split(‘‘);
????????????????????if?(temp.Length?==?1)
????????????????????{
????????????????????????line.ID?=?int.Parse(a);
????????????????????}
????????????????????else
????????????????????{
????????????????????????PointF?p?=?new?PointF();
????????????????????????p.X?=?float.Parse(temp[0]);
????????????????????????p.Y?=?float.Parse(temp[1]);
????????????????????????line.point.Add(p);
????????????????????}
????????????????}
????????????}
????????????
????????????//將北京54坐標轉為蘭伯特投影
????????????public?List?bj54ToLambert(double?B0?double?L0?double?B1?double?B2)
????????????{
????????????????//常數以及數值變換
????????????????double?a?=?6378245;
????????????????double?e2?=?0.006693421622966;
????????????????B0?=?B0?/?180?*?Math.PI;
????????????????B1?=?B1?/?180?*?Math.PI;
????????????????B2?=?B2?/?180?*?Math.PI;
????????????????double?m1?=?Math.Cos(B1)?/?Math.Sqrt(1?-?e2?*?Math.Pow(Math.Sin(B1)?2));
????????????????double?m2?=?Math.Cos(B2)?/?Math.Sqrt(1?-?e2?*?Math.Pow(Math.Sin(B2)?2));
????????????????double?t0?=?Math.Tan(Math.PI?/?4?-?B0?/?2)?/?Math.Pow((1?-?Math.Sqrt(e2)?*?Math.Sin(B0))?/?(1?+?Math.Sqrt(e2)?*?Math.Sin(B0))?Math.Sqrt(e2)?/?2);
????????????????double?t1?=?Math.Tan(Math.PI?/?4?-?B1?/?2)?/?Math.Pow((1?-?Math.Sqrt(e2)?*?Math.Sin(B1))?/?(1?+?Math.Sqrt(e2)?*?Math.Sin(B1))?Math.Sqrt(e2)?/?2);
????????????????double?t2?=?Math.Tan(Math.PI?/?4?-?B2?/?2)?/?Math.Pow((1?-?Math.Sqrt(e
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????582725??2005-10-10?19:11??作業6地圖投影\CHINA_Arc.gen
?????文件?????763676??2011-09-22?10:59??作業6地圖投影\country.gen
?????文件????????187??2014-11-03?11:25??作業6地圖投影\project\App.config
?????文件?????582725??2005-10-10?19:11??作業6地圖投影\project\bin\Debug\CHINA_Arc.gen
?????文件?????763676??2011-09-22?10:59??作業6地圖投影\project\bin\Debug\country.gen
?????文件????5214368??2014-01-03?07:08??作業6地圖投影\project\bin\Debug\mscorlib.dll
?????文件??????59342??2012-06-02?22:34??作業6地圖投影\project\bin\Debug\normidna.nlp
?????文件??????47076??2012-06-02?22:34??作業6地圖投影\project\bin\Debug\normnfc.nlp
?????文件??????40566??2012-06-02?22:34??作業6地圖投影\project\bin\Debug\normnfd.nlp
?????文件??????67808??2012-06-02?22:34??作業6地圖投影\project\bin\Debug\normnfkc.nlp
?????文件??????61718??2012-06-02?22:34??作業6地圖投影\project\bin\Debug\normnfkd.nlp
?????文件??????18432??2014-12-21?19:01??作業6地圖投影\project\bin\Debug\project.exe
?????文件????????187??2014-11-03?11:25??作業6地圖投影\project\bin\Debug\project.exe.config
?????文件??????46592??2014-12-21?19:01??作業6地圖投影\project\bin\Debug\project.pdb
?????文件??????11592??2014-12-21?19:01??作業6地圖投影\project\bin\Debug\project.vshost.exe
?????文件????????187??2014-11-03?11:25??作業6地圖投影\project\bin\Debug\project.vshost.exe.config
?????文件????????490??2012-06-02?22:34??作業6地圖投影\project\bin\Debug\project.vshost.exe.manifest
?????文件?????106331??2014-10-27?22:07??作業6地圖投影\project\bin\Debug\world.gen
?????文件?????956424??2012-08-31?08:51??作業6地圖投影\project\bin\Debug\zh-Hans\mscorlib.resources.dll
?????文件??????16344??2014-12-21?19:01??作業6地圖投影\project\Form1.cs
?????文件???????7791??2014-12-21?19:01??作業6地圖投影\project\Form1.Designer.cs
?????文件???????5817??2014-12-21?19:01??作業6地圖投影\project\Form1.resx
?????文件??????28279??2014-12-07?21:28??作業6地圖投影\project\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6050??2014-12-21?19:01??作業6地圖投影\project\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????3057??2014-12-21?19:01??作業6地圖投影\project\obj\Debug\project.csproj.FileListAbsolute.txt
?????文件????????975??2014-12-21?19:01??作業6地圖投影\project\obj\Debug\project.csproj.GenerateResource.Cache
?????文件?????161656??2014-12-07?21:42??作業6地圖投影\project\obj\Debug\project.csprojResolveAssemblyReference.cache
?????文件??????18432??2014-12-21?19:01??作業6地圖投影\project\obj\Debug\project.exe
?????文件????????180??2014-12-21?19:01??作業6地圖投影\project\obj\Debug\project.Form1.resources
?????文件??????46592??2014-12-21?19:01??作業6地圖投影\project\obj\Debug\project.pdb
............此處省略28個文件信息
- 上一篇:調用系統相機拍照并壓縮保存視頻錄制并播放功能
- 下一篇:計算復雜性導論
評論
共有 條評論