WXP C++ Library Version 6.74.9
|
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 () |
This class creates an array a earth points (lat, lon)
EarthPoints::EarthPoints | ( | ) |
Constructor. Initializes the values.
References init().
EarthPoints::EarthPoints | ( | int | size | ) |
EarthPoints::~EarthPoints | ( | ) |
Destructor.
EarthPoints::EarthPoints | ( | const EarthPoints & | data | ) |
int EarthPoints::add | ( | EarthPoint | ept | ) |
Adds a new point.
ept | EarthPoint class with values |
References expand(), WXP::EarthPoint::lat, and WXP::EarthPoint::lon.
int EarthPoints::add | ( | float | rlat, |
float | rlon | ||
) |
Adds a new point.
rlat | Sets lat |
rlon | Sets lon |
References expand().
Referenced by add(), WXP::ShapeFile::read(), and WXP::WarnFile::read().
int EarthPoints::add | ( | int | ind | ) |
Adds a new point from the existing list.
ind | Index of point to copy to end of list |
References add().
|
inline |
Simple add, no bounds check
References WXP::EarthPoint::lat, and WXP::EarthPoint::lon.
|
inline |
Simple add, no bounds check
|
inline |
Clears the array
Referenced by WXP::KmlData::init(), and WXP::ShapeData::init().
int EarthPoints::copy | ( | const EarthPoints & | data | ) |
Copy data.
data | Strings class to copy from |
References init().
Referenced by EarthPoints(), and operator=().
int EarthPoints::expand | ( | int | size | ) |
EarthPoint EarthPoints::get | ( | int | ind | ) |
Gets a specific point value from array.
ind | Index of value to get |
References get().
int EarthPoints::get | ( | int | ind, |
EarthPoint & | ept | ||
) |
Gets a specific point value from array.
ind | Index of value to get |
ept | Output EarthPoint class with values |
References WXP::EarthPoint::lat, and WXP::EarthPoint::lon.
Referenced by WXP::WarnPlot::draw(), WXP::Plot::drawLine(), and get().
|
inline |
Gets the latitude of a point
References WXP::Const::MISS.
|
inline |
Gets the latitude of a point, no bounds check
|
inline |
Gets the longitude of a point
References WXP::Const::MISS.
|
inline |
Gets the longitude of a point, no bounds check
|
inline |
Return the number of points
Referenced by WXP::WarnPlot::draw(), WXP::Plot::drawLine(), and WXP::ShapeData::print().
int EarthPoints::init | ( | ) |
Initializes the object
Referenced by copy(), EarthPoints(), and EarthPoints().
int EarthPoints::init | ( | int | size | ) |
Initializes the object
size | The initial number of points |
int EarthPoints::offset | ( | int | ind, |
float | rlat, | ||
float | rlon | ||
) |
Offsets a specific point value in array.
ind | Index of value to set |
rx | New x value |
ry | New y value |
EarthPoints EarthPoints::operator= | ( | const EarthPoints & | data | ) |
int EarthPoints::print | ( | ) |
Prints the values to standard output.
int EarthPoints::set | ( | int | ind, |
EarthPoint & | ept | ||
) |
Sets a specific point value in array.
ind | Index of value to set |
ept | New values |
References WXP::EarthPoint::lat, and WXP::EarthPoint::lon.
int EarthPoints::set | ( | int | ind, |
float | rlat, | ||
float | rlon | ||
) |
Sets a specific point value in array.
ind | Index of value to set |
rlat | New lat value |
rlon | New lon value |
int EarthPoints::within | ( | EarthPoint & | ept | ) |
Determines whether a specific point is within the array of points
ept | The point to test |
References WXP::EarthPoint::lat, and WXP::EarthPoint::lon.