资源简介
DrawMap_0725.rar
代码片段和文件信息
#include “StdAfx.h“
#include “Datadeal.h“
CDatadeal::CDatadeal(void)
{
xianshu=0; //将线的条数赋初始值 0
country_num=0;
mapRect.xmin = 100000000;
mapRect.ymin = 100000000;
mapRect.xmax = -100000000;
mapRect.ymax = -100000000;
wtRect.xmin = 100000000;
wtRect.ymin = 100000000;
wtRect.xmax = -100000000;
wtRect.ymax = -100000000;
}
CDatadeal::~CDatadeal(void)
{}
void CDatadeal::Read(char*filename)
{
string str;
fstream file;
char wal_shuju[256]=““;
file.open(filename);
if (file.fail())
{
AfxMessageBox(_T(“文件未打开“));
return ;
}
file.getline(wal_shuju256);
str=(string)wal_shuju;
while(str!=“PolygonBegin“)
{
file.getline(wal_shuju256);
str=(string)wal_shuju;
}
file.getline(wal_shuju256);
vector sit_dian;
do
{
for (int i=0;i<4;i++) //由5改为4
{
file.getline(wal_shuju256);
}
int xianshu_; //一条线里包含几条小线
file.getline(wal_shuju256);
xianshu_=atoi(wal_shuju);
int dianshu;
for (int i=0;i {
xianshu++;
file.getline(wal_shuju256); // 11
file.getline(wal_shuju256);
dianshu=atoi(wal_shuju);
for (int i=0;i {
dian zuobiao;
file.getline(wal_shuju256);
char*wal_x=strtok(wal_shuju““);
zuobiao.x=atof(wal_x);
char*wal_y=strtok(NULL““);
zuobiao.y=atof(wal_y);
sit_dian.push_back(zuobiao);
mapRect.xmin = min(mapRect.xminzuobiao.x);
mapRect.ymin = min(mapRect.yminzuobiao.y);
mapRect.xmax = max(mapRect.xmaxzuobiao.x);
mapRect.ymax = max(mapRect.ymaxzuobiao.y);
//file.getline(wal_shuju256);
}
dianList.push_back(sit_dian);
sit_dian.clear();
//file.getline(wal_shuju256);
}
file.getline(wal_shuju256);
file.getline(wal_shuju256);
file.getline(wal_shuju256);
str=(string)wal_shuju;
} while (str!=“PolygonEnd“);
for (int i=0;i<5;i++)
{
file.getline(wal_shuju256);
}
string str_;
str=(string)wal_shuju;
while (str==“TableEnd“) //加载多幅图,需用“!=”将其标注屏蔽掉
{
dian zuobiao;
char *sit_x *sit_y *m_doub[5];
char* country;
m_doub[0]=strtok(wal_shuju““);
m_doub[1]=strtok(NULL““);
sit_x=strtok(NULL““);
sit_y=strtok(NULL““);
m_doub[2]=strtok(NULL““);
m_doub[3]=strtok(NULL““);
country=strtok(NULL““);
//m_doub[4]=strtok(NULL““);
zuobiao.x=atof(sit_x);
zuobiao.y=atof(sit_y);
wtRect.xmax=max(zuobiao.xwtRect.xmax);
wtRect.xmin=min(zuobiao.xwtRect.xmin);
wtRect.ymax=max(zuobiao.ywtRect.ymax);
wtRect.ymin=min(zuobiao.ywtRect.ymin);
dianmember.push_back(zuobiao);
str_=(string)country;
string_.push_back(str_);
/* country_num++;*/
file.getline(wal_shuju256);
str=(string)wal_shuju;
}
file.close();
}
void CDatadeal::Display(CDC *pCDC)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2790312 2013-07-26 16:10 DrawMap_0725\DrawMap_0725\CHINA.WP
文件 1 2009-08-31 02:32 DrawMap_0725\DrawMap_0725\ClassDiagram1.cd
文件 5216124 2013-07-26 19:49 DrawMap_0725\DrawMap_0725\COUNTRY_WP.txt
文件 5116 2014-01-04 10:39 DrawMap_0725\DrawMap_0725\Datadeal.cpp
文件 635 2013-07-27 00:16 DrawMap_0725\DrawMap_0725\Datadeal.h
文件 128196 2013-07-26 19:30 DrawMap_0725\DrawMap_0725\DrawMap_0725.aps
文件 5029 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\DrawMap_0725.cpp
文件 692 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\DrawMap_0725.h
文件 26488 2013-07-26 19:30 DrawMap_0725\DrawMap_0725\DrawMap_0725.rc
文件 6439 2013-08-03 00:51 DrawMap_0725\DrawMap_0725\DrawMap_0725.vcxproj
文件 2986 2013-08-03 00:51 DrawMap_0725\DrawMap_0725\DrawMap_0725.vcxproj.filters
文件 143 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\DrawMap_0725.vcxproj.user
文件 2640 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\DrawMap_0725Doc.cpp
文件 883 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\DrawMap_0725Doc.h
文件 5756 2014-04-12 21:00 DrawMap_0725\DrawMap_0725\DrawMap_0725View.cpp
文件 2151 2013-08-04 23:57 DrawMap_0725\DrawMap_0725\DrawMap_0725View.h
文件 8694 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\MainFrm.cpp
文件 1095 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\MainFrm.h
文件 3602 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\ReadMe.txt
文件 67777 2009-08-31 02:31 DrawMap_0725\DrawMap_0725\res\DrawMap_0725.ico
文件 680 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\res\DrawMap_0725.rc2
文件 4710 2009-08-31 02:31 DrawMap_0725\DrawMap_0725\res\DrawMap_0725Doc.ico
文件 1078 2009-08-31 02:31 DrawMap_0725\DrawMap_0725\res\Toolbar.bmp
文件 5816 2009-08-31 03:59 DrawMap_0725\DrawMap_0725\res\Toolbar256.bmp
文件 3346 2013-07-26 18:18 DrawMap_0725\DrawMap_0725\resource.h
文件 145 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\stdafx.cpp
文件 1632 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\stdafx.h
文件 234 2013-07-26 16:54 DrawMap_0725\DrawMap_0725\targetver.h
文件 7976 2009-08-31 03:59 DrawMap_0725\DrawMap_0725\UserImages.bmp
文件 97734656 2014-04-12 21:29 DrawMap_0725\DrawMap_0725.sdf
............此处省略10个文件信息
相关资源
- pdfmake中文雅黑.zip
- Hadoop-TheDefinitiveGuide4thEdition.pdf
- SchoolManage02.rar
- IE8-WindowsXP-x86-ENU.exe
- ModelingandSimulationofAerospaceVehicleDynamic
- OpenCV计算机视觉编程攻略第3版完整高
-
install_flash_pla
yer_ppapi.exe - 20161027215755134.pdf
- DiskGeniusProV4.6.2.1.2014.06.13专业破解版
- 开源版.zip
- allwaysync15.1.0.zip
- TCPIP详解_卷1(52im.net独家制作CHM版)
- ERDAS2014破解文件及方法.rar
- 基本收发器.zip
- Serv-U15.0(32和64位)破解版.rar
- 微擎商业版1.8.3.zip
- [Tcl_Tk入门经典第2版].美奥斯德奥特,
- navicat4mac.zip
- 《精通SpringMVC4》GeoffroyWarin_7元购买
- 《深度学习之TensorFlow:入门、原理与
- operating-systems-internals-and-design-princip
- 图解HTTP彩色版.pdf
- 九阵医院9.0.3719升级文件列表注册全
- FileViewPro真正破解版.rar
- 通信原理(第六版)+pdf.pdf
- SetupRegexBuddy4.2.1.exe
- 防空导弹测试技术与遥测系统应用设
- 鸟哥的Linux私房菜-基础学习篇(第四
- IARforSTM82.10破解.rar
- 20170228112319577.rar
评论
共有 条评论