资源简介
世界地图DEM数据,数据内容完整,能够帮助你进行很好的地图开发!

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;
namespace DEM
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
readTXT();
maxMin();
numofrowcol();
// pointBelong();
//cordinateofpoint();
altitudeofponts();
}
private double[] txt=new double [8974];//如何实现动态二维数组?
private double[] xymaxmin = new double[4] {10000010000000 };//x小,y小,x大,y大
private int[] rowcol = new int[2];
//读文本到二维数组
public void readTXT()
{
char delimiterchar = ‘‘;
try
{
using (StreamReader sr = new StreamReader(“f:\\DEM\\dem.txt“))
{
string line;
int row = 1 col = 0;
while ((line = sr.ReadLine()) != null)
{
string[] lineOftxt = line.Split(delimiterchar);
foreach (string num in lineOftxt)
{
txt[row col] = double.Parse(num);
col++;
}
row++; col = 0;
}
}
}
catch (Exception e)
{
Console.WriteLine(“the file could not be read“);
Console.WriteLine(e.Message);
}
}
//格网间距为20计算m*n
public void numofrowcol()
{
rowcol[0] = (int)((xymaxmin[2] - xymaxmin[0]) / 20) + 1;//列
rowcol [1]=(int )((xymaxmin [3]-xymaxmin [1])/20)+1;//行
}
//计算机坐标范围
public void maxMin()
{
for (int row = 1; row <= 896; row++)
{
if (xymaxmin[0] > txt[row 1])
xymaxmin[0] = txt[row 1];
if (xymaxmin[2] xymaxmin[2] = txt[row 1];
if (xymaxmin[1] > txt[row 2])
xymaxmin[1] = txt[row 2];
if (xymaxmin[3] xymaxmin[3] = txt[row 2];
}
}
//计算每个点归属
public string[] pointBelong(int numofrowint numofcol )
{
int row=0;
int col=0;
string [] pointbelong=new string [numofrow numofcol ];
for (int i = 1; i <= 896; i++)
{
col = (int)((txt[i 1] - xymaxmin[0]) / 20);
row = (int)(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5612 2009-03-16 19:05 DEM\DEM\Properties\Resources.resx
文件 249 2009-03-16 19:05 DEM\DEM\Properties\Settings.settings
文件 1178 2009-03-16 19:05 DEM\DEM\Properties\AssemblyInfo.cs
文件 2860 2009-03-16 19:05 DEM\DEM\Properties\Resources.Designer.cs
文件 1086 2009-03-16 19:05 DEM\DEM\Properties\Settings.Designer.cs
文件 4417 2009-03-17 18:08 DEM\DEM\Form1.cs
文件 3213 2009-03-16 19:16 DEM\DEM\DEM.csproj
文件 5632 2005-11-11 22:25 DEM\DEM\bin\Debug\DEM.vshost.exe
文件 20480 2009-03-17 16:41 DEM\DEM\bin\Debug\DEM.exe
文件 26112 2009-03-17 16:41 DEM\DEM\bin\Debug\DEM.pdb
文件 180 2009-03-16 19:16 DEM\DEM\obj\Debug\DEM.Form1.resources
文件 180 2009-03-16 19:16 DEM\DEM\obj\Debug\DEM.Properties.Resources.resources
文件 842 2009-03-16 19:16 DEM\DEM\obj\Debug\DEM.csproj.GenerateResource.Cache
文件 20480 2009-03-17 16:41 DEM\DEM\obj\Debug\DEM.exe
文件 26112 2009-03-17 16:41 DEM\DEM\obj\Debug\DEM.pdb
文件 240 2009-03-17 16:48 DEM\DEM\obj\DEM.csproj.FileList.txt
文件 462 2009-03-16 19:05 DEM\DEM\Program.cs
文件 1458 2009-03-16 19:15 DEM\DEM\Form1.Designer.cs
文件 5814 2009-03-16 19:15 DEM\DEM\Form1.resx
文件 898 2009-03-16 19:05 DEM\DEM.sln
..A..H. 12288 2009-03-17 14:27 DEM\DEM.suo
目录 0 2009-03-16 19:05 DEM\DEM\obj\Debug\TempPE
目录 0 2009-03-16 19:44 DEM\DEM\obj\Debug\Refactor
目录 0 2009-03-16 19:05 DEM\DEM\bin\Debug
目录 0 2009-03-16 19:05 DEM\DEM\obj\Debug
目录 0 2009-03-16 19:05 DEM\DEM\Properties
目录 0 2009-03-16 19:05 DEM\DEM\bin
目录 0 2009-03-16 19:05 DEM\DEM\obj
目录 0 2009-03-16 19:05 DEM\DEM
目录 0 2009-03-16 19:05 DEM
............此处省略3个文件信息
相关资源
- 易语言播放器组件无缝转换(Demo2.e)
- cc2541 BLE DEMO
- stm32f030 IAP Demo(原创)
- 代码客:G-TcpServer(IOCP) 1.0 正式版及
- CListCtrlExDemo.rar
- 多普达USB Modem驱动(适用于818、828、
- 易语言-海康威视SDK-DEMO
- ssm框架登录注册demo
- RK3399 DEMO官方原厂 PCB 原理图以及周边
- MQTT推送Demo
- 微信小程序驾照考试题库demo完整
- redisson的demo
- bootstrap demo 源码大全
- springboot+rabbitmq项目demo(亲测可正常运
- 美松打印机SDK MsPrintSDK-Demo-DLL-CShare-
- 基于pytorch的UNet_demo实现及训练自己的
- 百度API车牌识别DEMO.rar
- stm32f105-usart-DMA收发demo
- springboot+webflux+mongodb+freemarker
- springboot整合activiti完整demo
- RFID读写demo
- 以鼠标位置为中心的滑轮放大功能d
- 基于Zxing的二维码条形码扫描和生成
- Rademacher和BPS混合黑洞
- 手机基站数据Demo
- iOS Swift简单Demo
- 基于DEM的流域信息提取方法及应用
- 基于DEM的水文模型在赧水流域的应用
- 海康摄像头+web3.0开发包SDK的demo
- 微信小程序开发视频+demo
评论
共有 条评论