WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
EarthPoints.h
1#ifndef _WINC_EARTHPOINTS
2#define _WINC_EARTHPOINTS
3
4#include <WXP/Const.h>
5#include <WXP/EarthPoint.h>
6#include <WXP/EarthRange.h>
7
8namespace WXP {
9 class EarthPoints { /* Coordinate data structure */
10 int num;
11 int max;
12 int ind;
13 float *lat;
14 float *lon;
16 public:
17 int init();
18 int init( int size );
20 EarthPoints(int size);
22 EarthPoints( const EarthPoints &data );
23 EarthPoints operator=( const EarthPoints &data );
24 int copy( const EarthPoints &data );
26 inline int clear(){ num = 0; return 1; };
27 int expand( int size );
28 int add( float lat, float lon );
29 int add( EarthPoint ept );
31 inline int add1( EarthPoint ept ){
32 lat[num] = ept.lat; lon[num] = ept.lon; num++; return 1; };
33 int add( int ind );
35 inline int add1( int ind ){
36 lat[num] = lat[ind]; lon[num] = lon[ind]; num++; return 1; };
37 int set( int ind, float rlat, float rlon );
38 int set( int ind, EarthPoint &ept );
39 int get( int ind, EarthPoint &ept );
40 EarthPoint get( int ind );
42 inline float getLat( int ind ){
43 return ind >= num || ind < 0 ? Const::MISS : lat[ind]; };
45 inline float getLon( int ind ){
46 return ind >= num || ind < 0 ? Const::MISS : lon[ind]; };
48 inline float getLat1( int ind ){ return lat[ind]; };
50 inline float getLon1( int ind ){ return lon[ind]; };
52 inline int getNum() { return num; };
53 int offset( int ind, float rlat, float rlon );
54 int within( EarthPoint &ept );
55 EarthRange getRange();
56 int print();
57 };
58}
59#endif
static const int MISS
Definition Const.h:7
This class creates an array a earth points (lat, lon)
Definition EarthPoints.h:9
int expand(int size)
Definition EarthPoints.cc:112
int copy(const EarthPoints &data)
Definition EarthPoints.cc:97
~EarthPoints()
Definition EarthPoints.cc:63
EarthPoints operator=(const EarthPoints &data)
Definition EarthPoints.cc:84
float getLon1(int ind)
Definition EarthPoints.h:50
EarthPoints()
Definition EarthPoints.cc:44
float getLat(int ind)
Definition EarthPoints.h:42
int add1(int ind)
Definition EarthPoints.h:35
int print()
Definition EarthPoints.cc:277
int getNum()
Definition EarthPoints.h:52
int add1(EarthPoint ept)
Definition EarthPoints.h:31
int add(float lat, float lon)
Definition EarthPoints.cc:141
int clear()
Definition EarthPoints.h:26
int get(int ind, EarthPoint &ept)
Definition EarthPoints.cc:200
int set(int ind, float rlat, float rlon)
Definition EarthPoints.cc:176
float getLat1(int ind)
Definition EarthPoints.h:48
float getLon(int ind)
Definition EarthPoints.h:45
int offset(int ind, float rlat, float rlon)
Definition EarthPoints.cc:225
int within(EarthPoint &ept)
Definition EarthPoints.cc:253
int init()
Definition EarthPoints.cc:18
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines earth point values (lat, lon, elev)
Definition EarthPoint.h:5
float lat
Definition EarthPoint.h:6
float lon
Definition EarthPoint.h:7
This struct defines a range of latitudes and longitudes.
Definition EarthRange.h:5