libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
Geometry.cpp File Reference

Namespaces

 osmscout
 

Functions

OSMSCOUT_API std::string osmscout::BearingDisplayString (double bearing)
 COnvert the bearing to to a direction description in releation tothe compass. More...
 
OSMSCOUT_API double osmscout::CalculateDistancePointToLineSegment (const GeoCoord &p, const GeoCoord &a, const GeoCoord &b, GeoCoord &intersection)
 Calculates the distance between a point p and a line defined by the points a and b. More...
 
OSMSCOUT_API double osmscout::DistanceToSegment (double px, double py, double p1x, double p1y, double p2x, double p2y, double &r, double &qx, double &qy)
 Return de distance of the point (px,py) to the segment [(p1x,p1y),(p2x,p2y)], r the abscissa on the line of (qx,qy) the orthogonal projected point from (px,py). More...
 
OSMSCOUT_API double osmscout::GetEllipsoidalDistance (double aLon, double aLat, double bLon, double bLat)
 Calculates the ellipsoidal (WGS-84) distance between the two given points on the ellipsoid. More...
 
OSMSCOUT_API double osmscout::GetEllipsoidalDistance (const GeoCoord &a, const GeoCoord &b)
 Calculates the ellipsoidal (WGS-84) distance between the two given points on the ellipsoid. More...
 
OSMSCOUT_API void osmscout::GetEllipsoidalDistance (double lat1, double lon1, double bearing, double distance, double &lat2, double &lon2)
 Given a starting point and a bearing and a distance calculates the coordinates of the resulting point in the (WGS-84) ellipsoid. More...
 
OSMSCOUT_API double osmscout::GetSphericalBearingFinal (double aLon, double aLat, double bLon, double bLat)
 Calculates the final bearing for a line from one coordinate two the other coordinate on a sphere. More...
 
OSMSCOUT_API double osmscout::GetSphericalBearingFinal (const GeoCoord &a, const GeoCoord &b)
 Calculates the final bearing for a line from one coordinate two the other coordinate on a sphere. More...
 
OSMSCOUT_API double osmscout::GetSphericalBearingInitial (double aLon, double aLat, double bLon, double bLat)
 Calculates the initial bearing for a line from one coordinate two the other coordinate on a sphere. More...
 
OSMSCOUT_API double osmscout::GetSphericalBearingInitial (const GeoCoord &a, const GeoCoord &b)
 Calculates the initial bearing for a line from one coordinate to the other coordinate on a sphere. More...
 
OSMSCOUT_API double osmscout::GetSphericalDistance (const GeoCoord &a, const GeoCoord &b)
 Calculates the spherical distance between the two given points on the sphere. More...
 
OSMSCOUT_API double osmscout::NormalizeRelativeAngel (double angle)
 Normalizes the given bearing to be in the interval [-180.0 - 180.0]. More...
 
OSMSCOUT_API size_t osmscout::Pow (size_t a, size_t b)
 
void OSMSCOUT_API osmscout::ScanConvertLine (int x1, int y1, int x2, int y2, std::vector< ScanCell > &cells)
 Does a scan conversion for a line between the given coordinates. More...