Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Transfer.h
Package: SHP_to_VCT.rar [view]
Upload User: bjslfz
Upload Date: 2022-07-25
Package Size: 4430k
Code Size: 3k
Category:
File Operate
Development Platform:
C/C++
- /************************************************************
- 文件名: Transfer.h
- 作者: 谢婧 Version : 1.0 Date: 2008/05/26
- 类描述: 是系统的核心部分,实现从shp格式的三个文件中读取有
- 效数据到vct格式文件中的功能,从而实现了shp格式到vct格式的
- 数据转换
- 邮件地址:xiejing0707@163.com
- ***********************************************************/
- #include "Vct.h"
- #include "shpFile.h"
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_TRANSFER_H__A7774916_9701_4498_9ACB_8AE173CE9A87__INCLUDED_)
- #define AFX_TRANSFER_H__A7774916_9701_4498_9ACB_8AE173CE9A87__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- /************************************************************************/
- /* modify by xiejing 2008-6-5 */
- /************************************************************************/
- extern CString csSourseFileName; //保存源文件的文件名
- class CTransfer
- {
- public:
- CTransfer(CString source,CString target);
- virtual ~CTransfer();
- int GetShang(int dividend, int divisor); // 求商
- BOOL ReadDBF(CString& csFileName);
- BOOL ReadRecord();
- int SetRecordPos( int iRecord );
- BOOL GetRecordHeader(SHPRECORDHEADER& varHeader );
- BOOL GetShpInfo(SHPINFO& varInfo);
- int ReadPoint(char* pszBuffer,int& iLength,BOOL& bEof);
- BOOL SHP2VCT(CString& sourceFileName,CString& targetFileName);
- BOOL WriteVctData(CString& csFileName);
- void WriteVctFileHead(FILE *pfile);
- void WriteVctAttribute(FILE* pfile);
- void WriteVctAnnotation(FILE* pfile);
- void WriteVctPolygon(FILE* pfile);
- void WriteVctLine(FILE* pfile);
- void WriteVctPoint(FILE* pfile);
- void WriteVctGraphy(FILE *pfile);
- void WriteVctTableStructure(FILE* pfile);
- void WriteVctFeature(FILE* pfile);
- private:
- void AttributeTransfer();
- void GraphyDatatransfer();
- void TableStructureTransfer();
- CString m_strFileName;
- void DataTransfer();
- BOOL InitVctData(CString& csFileName);
- BOOL m_bVctOpen;
- BOOL m_bShpOpen;
- BOOL m_bShxOpen;
- //CStdioFile m_sourceFile;
- //CStdioFile m_targetFile;
- VCTFileHead m_VctFilehead;
- VCTFeature *m_pVctFeature;
- VCTTableStructure *m_pVctTblStruct;
- VCTPointData *m_pVctPointData;
- VCTLineData *m_pVctLineData;
- VCTPolygonData* m_pVctPolygon;
- VCTAnnotation *m_pVctAnnotation;
- VCTAttribute *m_pVctAttribute;
- BOOL m_bBigEndian;
- CMapRectangle m_Extent;
- CMapRecordSet *m_pRecordSet;
- int m_shpFileLength;
- int m_shxFileLength;
- int m_iRecordCount;
- int m_shpType;
- // CMapRectangle m_CurMapExtent;
- CObList m_ObList;
- CFile m_fShp,m_fShx;
- FILE* m_pVctFile;
- };
- #endif // !defined(AFX_TRANSFER_H__A7774916_9701_4498_9ACB_8AE173CE9A87__INCLUDED_)