|
libosmscout 1.1.1
|

Classes | |
| class | osmscout::CLASS_FINAL< DataLoader > |
| class | osmscout::Projection |
| struct | osmscout::PathIntersection |
| struct | osmscout::TransPoint |
Functions | |
| double | osmscout::DegToRad (double deg) |
| double | osmscout::RadToDeg (double rad) |
| double | osmscout::AngleDiff (double a, double b) |
| template<class InputIt> | |
| void | osmscout::GetBoundingBox (const InputIt first, const InputIt last, GeoBox &boundingBox) |
| template<typename N> | |
| GeoBox | osmscout::GetBoundingBox (const std::vector< N > &nodes) |
| GeoBox | osmscout::GetBoundingBox (const std::vector< Point > &nodes) |
| template<typename N> | |
| void | osmscout::GetBoundingBox (const std::vector< N > &nodes, GeoBox &boundingBox) |
| void | osmscout::GetBoundingBox (const std::vector< Point > &nodes, GeoBox &boundingBox) |
| template<typename N> | |
| bool | osmscout::LinesIntersect (const N &a1, const N &a2, const N &b1, const N &b2) |
| template<typename N, typename I> | |
| bool | osmscout::GetLineIntersection (const N &a1, const N &a2, const N &b1, const N &b2, I &intersection) |
| template<typename N> | |
| bool | osmscout::GetLineIntersectionPixel (const N &a1, const N &a2, const N &b1, const N &b2, N &intersection) |
| template<typename N, typename M> | |
| bool | osmscout::IsCoordInArea (const N &point, const std::vector< M > &nodes) |
| template<typename N, typename M> | |
| int | osmscout::GetRelationOfPointToArea (const N &point, const std::vector< M > &nodes) |
| template<typename N, typename M> | |
| bool | osmscout::IsAreaCompletelyInArea (const std::vector< N > &a, const std::vector< M > &b) |
| template<typename N, typename M> | |
| bool | osmscout::IsAreaAtLeastPartlyInArea (const std::vector< N > &a, const std::vector< M > &b, const GeoBox &aBox, const GeoBox &bBox) |
| template<typename N, typename M> | |
| bool | osmscout::IsAreaAtLeastPartlyInArea (const std::vector< N > &a, const std::vector< M > &b) |
| template<typename N, typename M> | |
| bool | osmscout::IsAreaSubOfArea (const std::vector< N > &a, const std::vector< M > &b) |
| template<typename N, typename M> | |
| bool | osmscout::IsAreaSubOfAreaQuorum (const std::vector< N > &a, const std::vector< M > &b) |
| template<typename N, typename M> | |
| bool | osmscout::IsAreaSubOfAreaOrSame (const std::vector< N > &a, const std::vector< M > &b) |
| template<typename N> | |
| bool | osmscout::AreaIsSimple (std::vector< N > points) |
| template<typename N> | |
| bool | osmscout::AreaIsSimple (const std::vector< std::pair< N, N > > &edges, const std::vector< bool > &edgeStartsNewPoly) |
| template<typename N> | |
| bool | osmscout::AreaIsCCW (const std::vector< N > &edges) |
| template<typename N> | |
| bool | osmscout::AreaIsValid (std::vector< N > &outerPoints, std::vector< std::vector< N > > &innerPoints) |
| void | osmscout::Normalize (double x, double y, double &nx, double &ny) |
| double | osmscout::Det (double x1, double y1, double x2, double y2) |
| template<typename N> | |
| bool | osmscout::AreaIsClockwise (const std::vector< N > &edges) |
| OSMSCOUT_API Distance | osmscout::GetSphericalDistance (const GeoCoord &a, const GeoCoord &b) |
| OSMSCOUT_API Distance | osmscout::GetEllipsoidalDistance (double aLon, double aLat, double bLon, double bLat) |
| OSMSCOUT_API Distance | osmscout::GetEllipsoidalDistance (const GeoCoord &a, const GeoCoord &b) |
| OSMSCOUT_API void | osmscout::GetEllipsoidalDistance (double lat1, double lon1, const Bearing &bearing, const Distance &distance, double &lat2, double &lon2) |
| OSMSCOUT_API GeoCoord | osmscout::GetEllipsoidalDistance (const GeoCoord &position, const Bearing &bearing, const Distance &distance) |
| OSMSCOUT_API Bearing | osmscout::GetSphericalBearingInitial (const GeoCoord &a, const GeoCoord &b) |
| OSMSCOUT_API Bearing | osmscout::GetSphericalBearingFinal (const GeoCoord &a, const GeoCoord &b) |
| OSMSCOUT_API double | osmscout::GetDistanceInLonDegrees (const Distance &d, double latitude=0) |
| OSMSCOUT_API double | osmscout::NormalizeRelativeAngle (double angle) |
| void OSMSCOUT_API | osmscout::ScanConvertLine (int x1, int y1, int x2, int y2, std::vector< ScanCell > &cells) |
| OSMSCOUT_API double | osmscout::DistanceToSegment (double px, double py, double p1x, double p1y, double p2x, double p2y, double &r, double &qx, double &qy) |
| template<typename N> | |
| void | osmscout::FindPathIntersections (const std::vector< N > &aPath, const std::vector< N > &bPath, bool aClosed, bool bClosed, std::vector< PathIntersection > &intersections, size_t aStartIndex=0, size_t bStartIndex=0) |
| template<typename N> | |
| bool | osmscout::FindIntersection (const std::vector< N > &way, size_t &i, size_t &j) |
Collection of classes and methods related to low level geometric stuff.
|
inline |
compute difference of two angles
| a | angle in radians in range - M_PI .. + M_PI |
| b | angle in radians in range - M_PI .. + M_PI |
| bool osmscout::AreaIsCCW | ( | const std::vector< N > & | edges | ) |
Returns true, if the polygon is counter clock wise (CCW)
| bool osmscout::AreaIsClockwise | ( | const std::vector< N > & | edges | ) |
Returns true, if the closed polygon with the given nodes is oriented clockwise.
It is assumed, that the polygon is valid. Validity is not checked.
| bool osmscout::AreaIsSimple | ( | const std::vector< std::pair< N, N > > & | edges, |
| const std::vector< bool > & | edgeStartsNewPoly ) |
Returns true, if the handed polygons are simple (aka not complex). This method supports passing multiple closed polygons and checks all of them.
Currently it is checked, that the line segments that make up the polygon, only meet at their end points.
| bool osmscout::AreaIsSimple | ( | std::vector< N > | points | ) |
Returns true, if the handed polygon is simple (aka not complex).
Currently the following checks are done:
| bool osmscout::AreaIsValid | ( | std::vector< N > & | outerPoints, |
| std::vector< std::vector< N > > & | innerPoints ) |
| outerPoints | |
| innerPoints |
|
inline |
| deg | angle in degrees |
|
inline |
Calculates the determinant of the line between the given points.
|
extern |
Return the 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). 0 <= r <= 1 if q is between p1 and p2.
| bool osmscout::FindIntersection | ( | const std::vector< N > & | way, |
| size_t & | i, | ||
| size_t & | j ) |
Find next intersection on way (with itself) from node index i. Return true if some intersection was found (way is not simple), i and j indexes are setup to start possition of intesections lines.
| void osmscout::FindPathIntersections | ( | const std::vector< N > & | aPath, |
| const std::vector< N > & | bPath, | ||
| bool | aClosed, | ||
| bool | bClosed, | ||
| std::vector< PathIntersection > & | intersections, | ||
| size_t | aStartIndex = 0, | ||
| size_t | bStartIndex = 0 ) |
Find all intersections between aPath and bPath from node index aStartIndex and bStartIndex. Intersections are added to intersections vector.
| void osmscout::GetBoundingBox | ( | const InputIt | first, |
| const InputIt | last, | ||
| GeoBox & | boundingBox ) |
Calculate the bounding box of the (non empty) range of geo coords
| [first,last) | range of geo coords |
| resulting | bounding box |
| GeoBox osmscout::GetBoundingBox | ( | const std::vector< N > & | nodes | ) |
Calculate the bounding box of the (non empty) vector of geo coords
| nodes | The geo coordinates |
| void osmscout::GetBoundingBox | ( | const std::vector< N > & | nodes, |
| GeoBox & | boundingBox ) |
Calculate the bounding box of the (non empty) vector of geo coords
| nodes | The geo coordinates |
| bounding | box to fill |
|
inline |
Calculate the bounding box of the (non empty) vector of geo coords
| nodes | The geo coordinates |
|
inline |
Calculate the bounding box of the (non empty) vector of geo coords
| nodes | The geo coordinates |
| bounding | box to fill |
|
extern |
| d | distance |
| latitude | where degrees are computed. Function is not defined on poles (+90, -90), it may leads to division by zero error. |
|
extern |
Calculates the ellipsoidal (WGS-84) distance between the two given points on the ellipsoid.
|
extern |
Given a starting point and a bearing and a distance calculates the coordinates of the resulting point in the (WGS-84) ellipsoid.
|
extern |
Calculates the ellipsoidal (WGS-84) distance between the two given points on the ellipsoid.
|
extern |
Given a starting point and a bearing and a distance calculates the coordinates of the resulting point in the (WGS-84) ellipsoid.
| bool osmscout::GetLineIntersection | ( | const N & | a1, |
| const N & | a2, | ||
| const N & | b1, | ||
| const N & | b2, | ||
| I & | intersection ) |
Returns true, if the lines defined by the given coordinates intersect. Returns the intersection.
| bool osmscout::GetLineIntersectionPixel | ( | const N & | a1, |
| const N & | a2, | ||
| const N & | b1, | ||
| const N & | b2, | ||
| N & | intersection ) |
Returns true, if the lines defined by the given coordinates intersect. Returns the intersection.
|
inline |
Gives information about the position of the point in relation to the area.
If -1 returned, the point is outside the area, if 0, the point is on the area boundary, 1 the point is within the area.
|
extern |
Calculates the final bearing for a line from one coordinate two the other coordinate on a sphere.
|
extern |
Calculates the initial bearing for a line from one coordinate to the other coordinate on a sphere.
|
extern |
Calculates the spherical distance between the two given points on the sphere.
|
inline |
Return true, if at least one point of area a in within area b
|
inline |
Return true, if at least one point of area a in within area b
|
inline |
Return true, if area a is completely in area b
|
inline |
Assumes that the given areas do not intersect.
Returns true, of area a is within b (because at least one point of area a is in b), else (at least one point of area a is outside area b) false
|
inline |
Assumes that the given areas do not intersect.
Returns true, of area a is within b or the same as b. This version uses some heuristic based on the assumption that areas are either in another area or not - but there may be some smaller errors due to areas slightly overlapping.
|
inline |
Assumes that the given areas do not intersect.
Returns true, of area a is within b. This version uses some heuristic based on the assumption that areas are either in another area or not - but there may be some smaller errors due to areas slightly overlapping.
|
inline |
Returns true, if point in area.
http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm
Returns true, if point in on the area border or within the area.
See http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
| bool osmscout::LinesIntersect | ( | const N & | a1, |
| const N & | a2, | ||
| const N & | b1, | ||
| const N & | b2 ) |
Returns true, if the lines defined by the given coordinates intersect.
|
inline |
Normalize vector [x,y], result is set to [nx,ny]. When vector length is zero, nx,ny are unchanged.
|
extern |
Normalizes the given angle (in degrees) to be in the interval [-180.0 - 180.0]
|
inline |
| rad | angle in radians |
| 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.