資源簡介
坐標(biāo)轉(zhuǎn)換.rar

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?System.IO;
using?CSharpAlgorithm.Algorithm;
namespace?坐標(biāo)轉(zhuǎn)換
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????public?void?ComputePara4(string?path1?string?path2?int?nint?m
????????????out?double[]?X?out?double[]?v1out?double?rout?double?vtvout?double[]?v2)//n為坐標(biāo)對數(shù)m為公共點(diǎn)坐標(biāo)個數(shù)
????????{
????????????double[]?ori_xy?=?new?double[n?2];
????????????StreamReader?reader1?=?new?StreamReader(path1);//讀origin坐標(biāo)
????????????for?(int?i?=?0;?i?????????????{
????????????????string?buf?=?reader1.ReadLine();
????????????????string[]?line?=?buf.Split(‘‘);
????????????????ori_xy[i?0]?=?double.Parse(line[1]);
????????????????ori_xy[i?1]?=?double.Parse(line[2]);
????????????}
????????????reader1.Close();
????????????double[]?tar_xy?=?new?double[n?2];
????????????StreamReader?reader2?=?new?StreamReader(path2);//讀target坐標(biāo)
????????????for?(int?i?=?0;?i?????????????{
????????????????string?buf?=?reader2.ReadLine();
????????????????string[]?line?=?buf.Split(‘‘);
????????????????tar_xy[i?0]?=?double.Parse(line[1]);
????????????????tar_xy[i?1]?=?double.Parse(line[2]);
????????????}
????????????reader2.Close();
????????????X?=?new?double[4?1];//四參數(shù)
????????????v1?=?new?double[m?*?2?1];//公共點(diǎn)坐標(biāo)殘差
????????????v2?=?new?double[(n-m)?*?2?1];//檢核點(diǎn)坐標(biāo)殘差
????????????Matrix?CoordOrigin?=?new?Matrix(m?*?2?1);//Origin矩陣
????????????Matrix?CoordTarget?=?new?Matrix(m?*?2?1);//Target矩陣
????????????Matrix?DesignMat?=?new?Matrix(2?*?m?4);//設(shè)計矩陣
????????????for?(int?i?=?0;?i?????????????{
????????????????CoordOrigin.SetElement(i?*?2?0?ori_xy[i?0]);
????????????????CoordOrigin.SetElement(i?*?2?+?1?0?ori_xy[i?1]);
????????????????CoordTarget.SetElement(i?*?2?0?tar_xy[i?0]);
????????????????CoordTarget.SetElement(i?*?2?+?1?0?tar_xy[i?1]);
????????????????DesignMat.SetElement(i?*?2?0?1);
????????????????DesignMat.SetElement(i?*?2?1?0);
????????????????DesignMat.SetElement(i?*?2?2?ori_xy[i?1]);
????????????????DesignMat.SetElement(i?*?2?3?ori_xy[i?0]);
????????????????DesignMat.SetElement(i?*?2?+?1?0?0);
????????????????DesignMat.SetElement(i?*?2?+?1?1?1);
????????????????DesignMat.SetElement(i?*?2?+?1?2?-ori_xy[i?0]);
????????????????DesignMat.SetElement(i?*?2?+?1?3?ori_xy[i?1]);
????????????}
????????????Matrix?Nbb?=?(DesignMat.Transpose()?*?DesignMat);
????????????Nbb.InvertGaussJordan();
????????????Matrix?x?=?Nbb?*?(DesignMat.Transpose())?*?(CoordTarget);
????????????for?(int?i?=?0;?i?????????????????X[i?0]?=?x[i?0];
????????????Matrix?V1?=?(DesignMat?*?x)-CoordTarget;//計算公共點(diǎn)坐標(biāo)殘差
????????????for?(int?i?=?0;?i?<
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????187??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\App.config
?????文件??????52736??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\bin\Debug\坐標(biāo)轉(zhuǎn)換.exe
?????文件????????187??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\bin\Debug\坐標(biāo)轉(zhuǎn)換.exe.config
?????文件?????110080??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\bin\Debug\坐標(biāo)轉(zhuǎn)換.pdb
?????文件??????23168??2019-04-19?02:51??坐標(biāo)轉(zhuǎn)換\bin\Debug\坐標(biāo)轉(zhuǎn)換.vshost.exe
?????文件????????187??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\bin\Debug\坐標(biāo)轉(zhuǎn)換.vshost.exe.config
?????文件????????490??2017-09-29?21:43??坐標(biāo)轉(zhuǎn)換\bin\Debug\坐標(biāo)轉(zhuǎn)換.vshost.exe.manifest
?????文件??????29396??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\Form1.cs
?????文件??????11766??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\Form1.Designer.cs
?????文件???????5817??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\Form1.resx
?????文件??????61828??2019-04-18?19:40??坐標(biāo)轉(zhuǎn)換\Matrix.cs
?????文件???????1453??2019-04-18?22:26??坐標(biāo)轉(zhuǎn)換\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????7152??2019-04-18?15:13??坐標(biāo)轉(zhuǎn)換\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件??????????0??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件??????????0??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件??????????0??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
?????文件???????1140??2019-04-19?02:51??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.csproj.FileListAbsolute.txt
?????文件????????977??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.csproj.GenerateResource.Cache
?????文件???????2211??2019-04-18?23:27??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.csprojResolveAssemblyReference.cache
?????文件??????52736??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.exe
?????文件????????180??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.Form1.resources
?????文件?????110080??2019-04-19?01:37??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.pdb
?????文件????????180??2019-04-18?23:27??坐標(biāo)轉(zhuǎn)換\obj\Debug\坐標(biāo)轉(zhuǎn)換.Properties.Resources.resources
?????文件????????573??2019-04-18?19:09??坐標(biāo)轉(zhuǎn)換\Program.cs
?????文件???????1436??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\Properties\AssemblyInfo.cs
?????文件???????2854??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\Properties\Resources.Designer.cs
?????文件???????5612??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\Properties\Resources.resx
?????文件???????1099??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\Properties\Settings.Designer.cs
?????文件????????249??2019-04-18?14:49??坐標(biāo)轉(zhuǎn)換\Properties\Settings.settings
?????文件???????3841??2019-04-18?19:09??坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.csproj
............此處省略13個文件信息
- 上一篇:百度文庫提取工具
- 下一篇:廣東省15米分辨率下,廣東省行政邊界及海岸線
評論
共有 條評論