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

Function createBlob

common/map_sdk/mapdb/src/sqlite_operation.cpp:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58};
59
60static bool createBlob(const hadmap::Points3d& geom, const int srs, sqlite3_blob_data& blob) {
61 if (geom.empty()) return false;
62 gaiaGeomCollPtr coll = gaiaAllocGeomColl();
63 coll->Srid = srs;
64
65 gaiaLinestringPtr pline = 0;
66 coll->DimensionModel = GAIA_XY_Z;
67 pline = gaiaAllocLinestringXYZ(static_cast<int>(geom.size()));
68
69 for (size_t i = 0; i < geom.size(); ++i) gaiaSetPointXYZ(pline->Coords, i, geom[i].x, geom[i].y, geom[i].z);
70
71 gaiaInsertLinestringInGeomColl(coll, pline);
72 gaiaToSpatiaLiteBlobWkb(coll, &blob.data, &blob.size);
73 gaiaFreeGeomColl(coll);
74
75 return true;
76}
77
78static bool parseBlob(const sqlite3_blob_data& blob, hadmap::Points3d& geom) {
79 geom.clear();

Callers 10

insertRoadsMethod · 0.85
insertLanesMethod · 0.85
insertLaneBoundariesMethod · 0.85
insertLaneLinksMethod · 0.85
insertObjectGeomsMethod · 0.85
updateRoadMethod · 0.85
updateLaneMethod · 0.85
updateLaneBoundaryMethod · 0.85
updateLaneLinkMethod · 0.85
updateObjectGEOMMethod · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected