| 221 | } |
| 222 | |
| 223 | std::vector<RTreeLeaf> getEdges(const DataFacadeBase &facade, unsigned x, unsigned y, unsigned z) |
| 224 | { |
| 225 | double min_lon, min_lat, max_lon, max_lat; |
| 226 | |
| 227 | // Convert the z,x,y mercator tile coordinates into WGS84 lon/lat values |
| 228 | // |
| 229 | util::web_mercator::xyzToWGS84( |
| 230 | x, y, z, min_lon, min_lat, max_lon, max_lat, util::web_mercator::TILE_SIZE * 0.10); |
| 231 | |
| 232 | util::Coordinate southwest{util::FloatLongitude{min_lon}, util::FloatLatitude{min_lat}}; |
| 233 | util::Coordinate northeast{util::FloatLongitude{max_lon}, util::FloatLatitude{max_lat}}; |
| 234 | |
| 235 | // Fetch all the segments that are in our bounding box. |
| 236 | // This hits the OSRM StaticRTree |
| 237 | return facade.GetEdgesInBox(southwest, northeast); |
| 238 | } |
| 239 | |
| 240 | std::vector<std::size_t> getEdgeIndex(const std::vector<RTreeLeaf> &edges) |
| 241 | { |
no test coverage detected