11 #define M_PI 3.1415926535897
39 double latitude = 0.0;
40 double longitude = 0.0;
42 double cartesian_coords[2] = {0.0, 0.0};
47 void toCartesianCoords() {
48 const double R = 6378.;
49 double lat_rad = latitude *
M_PI / 180.;
50 double longit_rad = longitude *
M_PI / 180.;
51 cartesian_coords[0] = R * cos(lat_rad) * cos (longit_rad);
52 cartesian_coords[1] = R * cos(lat_rad) * sin (longit_rad);
70 : id(vid), latitude(latit), longitude(longit) {
80 : id(vert->id), latitude(vert->latitude), longitude(vert->longitude) {
114 this->longitude = longit;
124 coords[0] = cartesian_coords[0];
125 coords[1] = cartesian_coords[1];
#define M_PI
Definition: OSMVertex.h:11
Class that hold Open Street Map vertices.
Definition: OSMVertex.h:33
void getCartesianCoords(double *coords) const
Definition: OSMVertex.h:123
OSMVertex(const OSMVertex *vert)
Definition: OSMVertex.h:79
double getLatitude() const
Definition: OSMVertex.h:88
void setLongitude(double longit)
Definition: OSMVertex.h:113
OSMVertexID getVertexID() const
Definition: OSMVertex.h:138
double getLongitude() const
Definition: OSMVertex.h:105
OSMVertex(OSMVertexID vid, double latit, double longit)
Definition: OSMVertex.h:69
OSMVertex()
Definition: OSMVertex.h:60
long OSMVertexID
Definition: OSMVertex.h:35
void setVertexID(OSMVertexID vid)
Definition: OSMVertex.h:131
void setLatitude(double latit)
Definition: OSMVertex.h:96
Support for drawing Bar charts.
Definition: alltypes.h:4