WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
MapFile.h
1#ifndef _WINC_MAPFILE
2#define _WINC_MAPFILE
3
4#include <WXP/EarthPoint.h>
5#include <WXP/File.h>
6#include <WXP/KmlFile.h>
7#include <WXP/MapFileHeader.h>
8#include <WXP/ShapeFile.h>
9#include <WXP/Swap.h>
10
11namespace WXP {
12 class MapFile {
13 File file;
14 char field[20];
15 KmlFile kml;
16 KmlData kdata;
17 ShapeFile shape;
18 ShapeData sdata;
19 int cnt;
20 int num;
21 int access;
22 int type;
23 bool opened;
24 Swap swap;
25 public:
26
27 MapFile();
28 MapFile( const char *filename );
29 MapFile( const char *filenamem, int raccess, int rtype );
30 ~MapFile();
31
32 int checkType( const char *filename );
33 int open( const char *filenamem, int raccess, int rtype );
34 int open( const char *filename );
35 bool isOpen();
36 int rewind();
37 int seek( int off );
39 inline int tell(){ return file.tell(); };
40 int close();
42 inline bool isBinary(){ return type == BINARY; };
43 int readHeader( MapFileHeader &hdr );
44 int skipData();
45 int readData( EarthPoint &ept );
46 int writeHeader( MapFileHeader &hdr );
47 int writeData( EarthPoint &ept );
48 int print();
49
50 enum Type {
55 SHAPE
56 };
57 };
58}
59#endif
This class accesses files.
Definition File.h:15
int tell()
Definition File.cc:600
This class reads in surface data from a WXP formatted file from file.
Definition KmlFile.h:10
This class reads data from a map database file.
Definition MapFile.h:12
int skipData()
Definition MapFile.cc:231
~MapFile()
Definition MapFile.cc:125
bool isOpen()
Definition MapFile.cc:132
int checkType(const char *filename)
Definition MapFile.cc:48
MapFile()
Definition MapFile.cc:22
int close()
Definition MapFile.cc:155
int tell()
Definition MapFile.h:39
Type
Definition MapFile.h:50
@ KML
Definition MapFile.h:54
@ ASCII
Definition MapFile.h:53
@ SHAPE
Definition MapFile.h:55
@ UNK
Definition MapFile.h:51
@ BINARY
Definition MapFile.h:52
int writeData(EarthPoint &ept)
Definition MapFile.cc:292
int writeHeader(MapFileHeader &hdr)
Definition MapFile.cc:268
int open(const char *filenamem, int raccess, int rtype)
Definition MapFile.cc:77
int readHeader(MapFileHeader &hdr)
Definition MapFile.cc:164
int seek(int off)
Definition MapFile.cc:147
int rewind()
Definition MapFile.cc:139
int print()
Definition MapFile.cc:310
int readData(EarthPoint &ept)
Definition MapFile.cc:247
bool isBinary()
Definition MapFile.h:42
This struct stores ShapeFile data.
Definition ShapeData.h:8
This class reads in and writes shape files.
Definition ShapeFile.h:10
This class performs byte swapping.
Definition Swap.h:7
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines earth point values (lat, lon, elev)
Definition EarthPoint.h:5
This struct stores KML data.
Definition KmlData.h:8
This struct stores map segment header information.
Definition MapFileHeader.h:7