MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / getEdges

Function getEdges

src/engine/plugins/tile.cpp:223–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223std::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
240std::vector<std::size_t> getEdgeIndex(const std::vector<RTreeLeaf> &edges)
241{

Callers 1

HandleRequestMethod · 0.85

Calls 2

xyzToWGS84Function · 0.85
GetEdgesInBoxMethod · 0.45

Tested by

no test coverage detected