MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / getBoundaries

Method getBoundaries

common/map_sdk/map_engine/src/remote_search.cpp:253–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253int RemoteSearch::getBoundaries(const std::vector<hadmap::laneboundarypkid>& ids,
254 hadmap::txLaneBoundaries& boundaries) {
255 std::string baseUrl = pTrans->location();
256 std::string url = UrlGen(baseUrl).db(dbName).getBoundary().url();
257
258 std::vector<PostParamPtr> params;
259 for (auto& id : ids) params.push_back(PostParamPtr(new BoundaryIdParam(id)));
260 std::string postJson;
261 generatePostJson(params, postJson);
262
263 std::string jsonData;
264 if (pTrans->post(url, postJson, jsonData)) {
265 boundaries.clear();
266
267 JsonParser::parseBoundary(jsonData, boundaries);
268
269 return boundaries.empty() ? TX_HADMAP_DATA_EMPTY : TX_HADMAP_DATA_OK;
270 }
271
272 return TX_HADMAP_DATA_ERROR;
273}
274
275int RemoteSearch::getSections(const hadmap::txSectionId& sectionId, hadmap::txSections& sections) {
276 std::string baseUrl = pTrans->location();

Callers

nothing calls this directly

Calls 8

generatePostJsonFunction · 0.85
urlMethod · 0.80
getBoundaryMethod · 0.80
postMethod · 0.80
locationMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected