WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
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

References WXP::File::isOpen(), and WXP::File::read().

Referenced by open().

◆ close()

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().

◆ 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(), WXP::MapFile::open(), 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::Swap::init(), WXP::File::isOpen(), WXP::File::open(), WXP::Wxp::outDebug(), WXP::FileAttr::READ, WXP::File::seek(), WXP::File::write(), 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, WXP::Wxp::outDebug(), WXP::File::read(), WXP::File::seek(), and WXP::File::tell().

Referenced by WXP::MapFile::readHeader().

◆ write()

int ShapeFile::write ( ShapeData data)

Writes map data to file

Parameters
eptThe map vertex

References WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Const::MISS, and WXP::File::write().


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