#include <geom.h>
Public Member Functions | |
| Point () | |
| Point (double _lat, double _lon) | |
| Point (double _lat, double _lon, double _towerHeight) | |
| double | distance (Point *p) |
| double | bearing (Point *p) |
| Point * | project (double bearing, double distance) |
Public Attributes | |
| double | lat |
| Actual latitude of this point. | |
| double | lon |
| Actual longitude of this point. | |
| double | elev |
| Optional elevation of given point, usually filled by a Source object. | |
| double | towerHeight |
| Optional height of a tower at this point. | |
| double | vegHeight |
| Optional height of vegetation above ground elevation at this point, usually filled by a Source object. | |
| int | vegType |
| Optional raw vegetation type, usually filled by vegetation Source object. | |
| int | vegCover |
| Optional percentage (0-100) of vegetation cover as read from vegetation Source object. | |
| int | landType |
| Optional raw land use type, usually filled by a land-use Source object. | |
Friends | |
| ostream & | operator<< (ostream &output, const Point &p) |
| Output point in "(lat,long)" format. | |
| ofstream & | operator<< (ofstream &output, const Point &p) |
| Output point in "lat\tlong" format. | |
| ifstream & | operator>> (ifstream &input, Point &p) |
| Read in point in "lat\tlong" format. | |
| Point::Point | ( | ) |
| Point::Point | ( | double | _lat, | |
| double | _lon | |||
| ) |
Create new Point object with given coordinates.
| _lat | Latitude to assign to new point (range -90 to 90) | |
| _lon | Longitude to assign to new point (range -180 to 180) |
| Point::Point | ( | double | _lat, | |
| double | _lon, | |||
| double | _towerHeight | |||
| ) |
Create new Point object with given coordinates. Also set the height of a tower at this point to the height given in meters.
| _lat | Latitude to assign to new point (range -90 to 90) | |
| _lon | Longitude to assign to new point (range -180 to 180) | |
| _towerHeight | Height to assign to tower at this point (in meters) |
| double Point::distance | ( | Point * | p | ) |
Calculate the distance between this point and the second given point.
| p | Second point to compare this object against |
| double Point::bearing | ( | Point * | p | ) |
Calculate the compass bearing from this point towards the second given point. If we walk from this point using the returned bearing, we will reach the second point.
| p | Second point to compare this object against. |
| Point* Point::project | ( | double | bearing, | |
| double | distance | |||
| ) |
Project this point along the given bearing line for the given distance and return the new point.
| bearing | Bearing to follow from this point in radians (range 0 to 2) | |
| distance | Distance to walk along bearing line in kilometers |
| ostream& operator<< | ( | ostream & | output, | |
| const Point & | p | |||
| ) | [friend] |
Output point in "(lat,long)" format.
| ofstream& operator<< | ( | ofstream & | output, | |
| const Point & | p | |||
| ) | [friend] |
Output point in "lat\tlong" format.
| ifstream& operator>> | ( | ifstream & | input, | |
| Point & | p | |||
| ) | [friend] |
Read in point in "lat\tlong" format.
| double Point::lat |
Actual latitude of this point.
| double Point::lon |
Actual longitude of this point.
| double Point::elev |
Optional elevation of given point, usually filled by a Source object.
| double Point::towerHeight |
Optional height of a tower at this point.
| double Point::vegHeight |
Optional height of vegetation above ground elevation at this point, usually filled by a Source object.
| int Point::vegType |
Optional raw vegetation type, usually filled by vegetation Source object.
| int Point::vegCover |
Optional percentage (0-100) of vegetation cover as read from vegetation Source object.
| int Point::landType |
Optional raw land use type, usually filled by a land-use Source object.
1.5.4