WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::ShapeFile Class Reference

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)

Detailed Description

This class reads in and writes shape files.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ ShapeFile() [1/3]

ShapeFile::ShapeFile ( )

Constructor

◆ ShapeFile() [2/3]

ShapeFile::ShapeFile ( const char * filename)

Constructor. Opens the surface data file (access=READ, type=UNK)

Parameters
filenameFile to open

References open(), and WXP::FileAttr::READ.

◆ ShapeFile() [3/3]

ShapeFile::ShapeFile ( const char * filename,
int raccess )

Constructor. Opens the surface data file

Parameters
filenameFile to open
rtypeFile type (NORMAL, COMPRESS)

References open().

◆ ~ShapeFile()

ShapeFile::~ShapeFile ( )

Destructor

References close().

Member Function Documentation

◆ checkType()

int ShapeFile::checkType ( const char * filename)
static

Checks the type of data in the file

Parameters
filenameFile to check

Referenced by open().

◆ close()

int ShapeFile::close ( )

Closes the surface data file

References WXP::FileAttr::WRITE.

Referenced by ~ShapeFile().

◆ open() [1/2]

int ShapeFile::open ( const char * filename)

Opens the surface data file

Parameters
filenameFile to open

References open(), and WXP::FileAttr::READ.

Referenced by open(), ShapeFile(), and ShapeFile().

◆ open() [2/2]

int ShapeFile::open ( const char * filename,
int raccess )

Opens the surface data file

Parameters
filenameFile to open
rtypeFile type (NORMAL, COMPRESS)

References checkType(), WXP::String::init(), WXP::Wxp::outDebug(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.

◆ read()

int ShapeFile::read ( ShapeData & data)

Reads a single report/station from the data file

Return values
dataShapeData class to put the data from the file

References WXP::EarthPoints::add(), WXP::ShapeData::init(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, and WXP::Wxp::outDebug().

◆ write()

int ShapeFile::write ( ShapeData & data)

Writes map data to file

Parameters
eptThe map vertex

References WXP::EarthPoint::lat, WXP::EarthPoint::lon, and WXP::Const::MISS.


The documentation for this class was generated from the following files: