|
WXP C++ Library Version 6.74.9
|
This class reads in and writes shape files. More...
#include "../include/ShapeFile.h"
Public Member Functions | |
| ShapeFile () | |
| ShapeFile (const char *filename) | |
| ShapeFile (const char *filename, int raccess) | |
| ~ShapeFile () | |
| bool | isOpen () |
| int | open (const char *filename) |
| int | open (const char *filename, int raccess) |
| int | close () |
| int | read (ShapeData &data) |
| int | write (ShapeData &data) |
Static Public Member Functions | |
| static int | checkType (const char *filename) |
This class reads in and writes shape files.
| ShapeFile::ShapeFile | ( | ) |
Constructor
| ShapeFile::ShapeFile | ( | const char * | filename | ) |
Constructor. Opens the surface data file (access=READ, type=UNK)
| filename | File to open |
References open(), and WXP::FileAttr::READ.
| ShapeFile::ShapeFile | ( | const char * | filename, |
| int | raccess | ||
| ) |
| ShapeFile::~ShapeFile | ( | ) |
Destructor
References close().
|
static |
Checks the type of data in the file
| filename | File to check |
References WXP::File::isOpen(), and WXP::File::read().
Referenced by open().
| int ShapeFile::close | ( | ) |
Closes the surface data file
References WXP::File::close(), WXP::File::seek(), WXP::File::tell(), and WXP::FileAttr::WRITE.
Referenced by ~ShapeFile().
| int ShapeFile::open | ( | const char * | filename | ) |
Opens the surface data file
| filename | File to open |
References open(), and WXP::FileAttr::READ.
Referenced by open(), WXP::MapFile::open(), ShapeFile(), and ShapeFile().
| int ShapeFile::open | ( | const char * | filename, |
| int | raccess | ||
| ) |
Opens the surface data file
References checkType(), WXP::Swap::init(), WXP::File::isOpen(), WXP::File::open(), WXP::Wxp::outDebug(), WXP::FileAttr::READ, WXP::File::seek(), WXP::File::write(), and WXP::FileAttr::WRITE.
| int ShapeFile::read | ( | ShapeData & | data | ) |
Reads a single report/station from the data file
| data | ShapeData class to put the data from the file |
References WXP::EarthPoints::add(), WXP::ShapeData::init(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Wxp::outDebug(), WXP::File::read(), WXP::File::seek(), and WXP::File::tell().
Referenced by WXP::MapFile::readHeader().
| int ShapeFile::write | ( | ShapeData & | data | ) |
Writes map data to file
| ept | The map vertex |
References WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Const::MISS, and WXP::File::write().