MCPcopy Create free account
hub / github.com/Kitware/VTK / insertGrid

Method insertGrid

ThirdParty/libproj/vtklibproj/src/grids.cpp:1234–1252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1232// ---------------------------------------------------------------------------
1233
1234void GTiffVGrid::insertGrid(PJ_CONTEXT *ctx,
1235 std::unique_ptr<GTiffVGrid> &&subgrid) {
1236 bool gridInserted = false;
1237 const auto &extent = subgrid->extentAndRes();
1238 for (const auto &candidateParent : m_children) {
1239 const auto &candidateParentExtent = candidateParent->extentAndRes();
1240 if (candidateParentExtent.contains(extent)) {
1241 static_cast<GTiffVGrid *>(candidateParent.get())
1242 ->insertGrid(ctx, std::move(subgrid));
1243 gridInserted = true;
1244 break;
1245 } else if (candidateParentExtent.intersects(extent)) {
1246 pj_log(ctx, PJ_LOG_DEBUG, "Partially intersecting grids found!");
1247 }
1248 }
1249 if (!gridInserted) {
1250 m_children.emplace_back(std::move(subgrid));
1251 }
1252}
1253
1254// ---------------------------------------------------------------------------
1255

Callers 1

insertIntoHierarchyFunction · 0.80

Calls 5

pj_logFunction · 0.85
containsMethod · 0.45
getMethod · 0.45
intersectsMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected