資源簡介
c#開發的基于arcgis engine 的空間分析全部C#代碼(不包含網絡分析部分)

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?ESRI.ArcGIS.esriSystem;
using?ESRI.ArcGIS.Geodatabase;
using?ESRI.ArcGIS.Carto;
using?ESRI.ArcGIS.DataSourcesFile;
using?ESRI.ArcGIS.Geometry;
using?ESRI.ArcGIS.DataSourcesRaster;
using?ESRI.ArcGIS.Display;
using?ESRI.ArcGIS.Controls;
using?ESRI.ArcGIS.SystemUI;
using?ESRI.ArcGIS.GeoAnalyst;
using?System.Collections;
using?ESRI.ArcGIS.SpatialAnalyst;
namespace?WindowsApplication1
{
????public?partial?class?Allocation?:?Form
????{
????????public?Allocation()
????????{
????????????InitializeComponent();
????????}
????????public?IMap?pMap;
????????public?int?layerIndex1?layerIndex2;
????????string?Filename;
????????public?IRasterlayer?pRasterlayer?=?new?RasterlayerClass();
????????private?void?Allocation_Load(object?sender?EventArgs?e)
????????{
????????????comboBox1.Items.Clear();
????????????comboBox2.Items.Clear();
????????????int?i?layCount;
????????????layCount?=?pMap.layerCount;
????????????for?(i?=?0;?i?????????????{
????????????????comboBox1.Items.Add(pMap.get_layer(i).Name);
????????????????comboBox2.Items.Add(pMap.get_layer(i).Name);
????????????}???????
????????}
????????private?void?comboBox1_SelectedIndexChanged(object?sender?EventArgs?e)
????????{
????????????layerIndex1?=?comboBox1.SelectedIndex;
????????}
????????private?void?comboBox2_SelectedIndexChanged(object?sender?EventArgs?e)
????????{
????????????layerIndex2?=?comboBox2.SelectedIndex;
????????}
????????private?void?button3_Click(object?sender?EventArgs?e)
????????{
????????????saveFileDialog1.Filter?=?“IMAGINE|*.img“;
????????????saveFileDialog1.RestoreDirectory?=?true;
????????????if?(saveFileDialog1.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????Filename?=?saveFileDialog1.FileName;
????????????????textBox1.Text?=?Filename;
????????????}
????????}
????????public?IRasterlayer?Allocation1(IRasterlayer?sourceRasterlayer?string?maxDistance?IFeaturelayer?extentlayer?string?outputFileName)
????????{
????????????if?(System.IO.File.Exists(outputFileName))
????????????{
????????????????System.IO.File.Delete(outputFileName);
????????????}
????????????IGeoDataset?sourceRaster?=?sourceRasterlayer.Raster?as?IGeoDataset;
????????????IGeoDataset?costRaster?=?extentlayer.FeatureClass?as?IGeoDataset;
????????????IDistanceOp2?distanceOp?=?new?RasterDistanceOpClass();
????????????IRasterAnalysisEnvironment?rasAnaEnv?=?distanceOp?as?IRasterAnalysisEnvironment;
????????????//設置生成圖層的工作空間
????????????IWorkspaceFactory?wsf?=?new?RasterWorkspaceFactoryClass();
????????????string?outputPath?=?System.IO.Path.GetDirectoryName(outputFileName);
????????????string?fileName?=?System.IO.Path.GetFileName(outputFileName);
????????????IWorkspace?ws?=?wsf.OpenFromFile(outputPath?0);
????????????rasAnaEnv.
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????946??2010-05-14?14:33??空間分析\WindowsApplication1.sln
????..A..H.?????68096??2010-09-15?12:19??空間分析\WindowsApplication1.suo
?????文件???????4814??2010-09-15?10:08??空間分析\WindowsApplication1\Allocation.cs
?????文件???????9055??2010-09-15?10:08??空間分析\WindowsApplication1\Allocation.Designer.cs
?????文件???????6017??2010-09-15?10:08??空間分析\WindowsApplication1\Allocation.resx
?????文件???????1914??2010-09-14?21:11??空間分析\WindowsApplication1\Aspect.cs
?????文件???????7050??2010-09-14?21:11??空間分析\WindowsApplication1\Aspect.Designer.cs
?????文件???????6017??2010-09-14?21:11??空間分析\WindowsApplication1\Aspect.resx
?????文件???????2437??2010-09-14?22:00??空間分析\WindowsApplication1\Contour.cs
?????文件???????8453??2010-09-14?22:00??空間分析\WindowsApplication1\Contour.Designer.cs
?????文件???????5814??2010-09-14?22:00??空間分析\WindowsApplication1\Contour.resx
?????文件???????4826??2010-09-15?10:04??空間分析\WindowsApplication1\Cost_Weighted.cs
?????文件???????8089??2010-09-15?10:04??空間分析\WindowsApplication1\Cost_Weighted.Designer.cs
?????文件???????6017??2010-09-15?10:04??空間分析\WindowsApplication1\Cost_Weighted.resx
?????文件???????2064??2010-09-14?21:13??空間分析\WindowsApplication1\Cut_Fill.cs
?????文件???????7387??2010-09-14?21:13??空間分析\WindowsApplication1\Cut_Fill.Designer.cs
?????文件???????5814??2010-09-14?21:13??空間分析\WindowsApplication1\Cut_Fill.resx
?????文件???????2593??2010-06-11?14:08??空間分析\WindowsApplication1\DataView.cs
?????文件???????2366??2010-06-11?14:08??空間分析\WindowsApplication1\DataView.Designer.cs
?????文件???????5814??2010-06-11?14:08??空間分析\WindowsApplication1\DataView.resx
?????文件???????6202??2010-09-15?10:08??空間分析\WindowsApplication1\Feature?To?Raster.cs
?????文件??????17397??2010-09-14?15:48??空間分析\WindowsApplication1\IDW.cs
?????文件???????8321??2010-09-14?15:48??空間分析\WindowsApplication1\IDW.designer.cs
?????文件???????7432??2010-09-14?15:48??空間分析\WindowsApplication1\IDW.resx
?????文件???????5266??2010-09-14?11:29??空間分析\WindowsApplication1\Kernel?Density.cs
?????文件???????9361??2010-09-14?09:59??空間分析\WindowsApplication1\Kernel?Density.designer.cs
?????文件???????6023??2010-09-14?09:59??空間分析\WindowsApplication1\Kernel?Density.resx
?????文件???????6671??2010-09-14?15:30??空間分析\WindowsApplication1\Kriging.cs
?????文件??????13358??2010-09-14?15:28??空間分析\WindowsApplication1\Kriging.designer.cs
?????文件???????7432??2010-09-14?15:28??空間分析\WindowsApplication1\Kriging.resx
............此處省略107個文件信息
- 上一篇:ASP.NET C# 電子通訊錄系統.
- 下一篇:C#asp.net航空售票系統
評論
共有 條評論