WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WXP::EarthPoints Class Reference

This class creates an array a earth points (lat, lon) More...

#include "../include/EarthPoints.h"

Public Member Functions

int init ()
 
int init (int size)
 
 EarthPoints ()
 
 EarthPoints (int size)
 
 ~EarthPoints ()
 
 EarthPoints (const EarthPoints &data)
 
EarthPoints operator= (const EarthPoints &data)
 
int copy (const EarthPoints &data)
 
int clear ()
 
int expand (int size)
 
int add (float lat, float lon)
 
int add (EarthPoint ept)
 
int add1 (EarthPoint ept)
 
int add (int ind)
 
int add1 (int ind)
 
int set (int ind, float rlat, float rlon)
 
int set (int ind, EarthPoint &ept)
 
int get (int ind, EarthPoint &ept)
 
EarthPoint get (int ind)
 
float getLat (int ind)
 
float getLon (int ind)
 
float getLat1 (int ind)
 
float getLon1 (int ind)
 
int getNum ()
 
int offset (int ind, float rlat, float rlon)
 
int within (EarthPoint &ept)
 
EarthRange getRange ()
 
int print ()
 

Detailed Description

This class creates an array a earth points (lat, lon)

Author
Dan Vietor

Constructor & Destructor Documentation

◆ EarthPoints() [1/3]

EarthPoints::EarthPoints ( )

Constructor. Initializes the values.

References init().

◆ EarthPoints() [2/3]

EarthPoints::EarthPoints ( int  size)

Constructor. Size the arrays.

Parameters
sizeThe initial number of points

References init().

◆ ~EarthPoints()

EarthPoints::~EarthPoints ( )

Destructor.

◆ EarthPoints() [3/3]

EarthPoints::EarthPoints ( const EarthPoints data)

Copy constructor.

Parameters
dataStrings class to copy from

References copy().

Member Function Documentation

◆ add() [1/3]

int EarthPoints::add ( EarthPoint  ept)

Adds a new point.

Parameters
eptEarthPoint class with values

References expand(), WXP::EarthPoint::lat, and WXP::EarthPoint::lon.

◆ add() [2/3]

int EarthPoints::add ( float  rlat,
float  rlon 
)

Adds a new point.

Parameters
rlatSets lat
rlonSets lon

References expand().

Referenced by add(), WXP::ShapeFile::read(), and WXP::WarnFile::read().

◆ add() [3/3]

int EarthPoints::add ( int  ind)

Adds a new point from the existing list.

Parameters
indIndex of point to copy to end of list

References add().

◆ add1() [1/2]

int WXP::EarthPoints::add1 ( EarthPoint  ept)
inline

Simple add, no bounds check

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

◆ add1() [2/2]

int WXP::EarthPoints::add1 ( int  ind)
inline

Simple add, no bounds check

◆ clear()

int WXP::EarthPoints::clear ( )
inline

Clears the array

Referenced by WXP::KmlData::init(), and WXP::ShapeData::init().

◆ copy()

int EarthPoints::copy ( const EarthPoints data)

Copy data.

Parameters
dataStrings class to copy from

References init().

Referenced by EarthPoints(), and operator=().

◆ expand()

int EarthPoints::expand ( int  size)

Expands the array

Parameters
sizeThe new size

Referenced by add().

◆ get() [1/2]

EarthPoint EarthPoints::get ( int  ind)

Gets a specific point value from array.

Parameters
indIndex of value to get
Returns
Output EarthPoint class with values

References get().

◆ get() [2/2]

int EarthPoints::get ( int  ind,
EarthPoint ept 
)

Gets a specific point value from array.

Parameters
indIndex of value to get
Return values
eptOutput EarthPoint class with values

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

Referenced by WXP::WarnPlot::draw(), WXP::Plot::drawLine(), and get().

◆ getLat()

float WXP::EarthPoints::getLat ( int  ind)
inline

Gets the latitude of a point

References WXP::Const::MISS.

◆ getLat1()

float WXP::EarthPoints::getLat1 ( int  ind)
inline

Gets the latitude of a point, no bounds check

◆ getLon()

float WXP::EarthPoints::getLon ( int  ind)
inline

Gets the longitude of a point

References WXP::Const::MISS.

◆ getLon1()

float WXP::EarthPoints::getLon1 ( int  ind)
inline

Gets the longitude of a point, no bounds check

◆ getNum()

int WXP::EarthPoints::getNum ( )
inline

Return the number of points

Referenced by WXP::WarnPlot::draw(), WXP::Plot::drawLine(), and WXP::ShapeData::print().

◆ init() [1/2]

int EarthPoints::init ( )

Initializes the object

Referenced by copy(), and EarthPoints().

◆ init() [2/2]

int EarthPoints::init ( int  size)

Initializes the object

Parameters
sizeThe initial number of points

◆ offset()

int EarthPoints::offset ( int  ind,
float  rlat,
float  rlon 
)

Offsets a specific point value in array.

Parameters
indIndex of value to set
rxNew x value
ryNew y value

◆ operator=()

EarthPoints EarthPoints::operator= ( const EarthPoints data)

Assignment operator. Used to overload copying

Parameters
dataString class to copy from

References copy().

◆ print()

int EarthPoints::print ( )

Prints the values to standard output.

◆ set() [1/2]

int EarthPoints::set ( int  ind,
EarthPoint ept 
)

Sets a specific point value in array.

Parameters
indIndex of value to set
eptNew values

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

◆ set() [2/2]

int EarthPoints::set ( int  ind,
float  rlat,
float  rlon 
)

Sets a specific point value in array.

Parameters
indIndex of value to set
rlatNew lat value
rlonNew lon value

◆ within()

int EarthPoints::within ( EarthPoint ept)

Determines whether a specific point is within the array of points

Parameters
eptThe point to test

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


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