MCPcopy Create free account
hub / github.com/OSGeo/PROJ / reopen

Method reopen

src/grids.cpp:1360–1375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1358 }
1359
1360 bool reopen(PJ_CONTEXT *ctx) override {
1361 pj_log(ctx, PJ_LOG_DEBUG, "Grid %s has changed. Re-loading it",
1362 m_name.c_str());
1363 m_grids.clear();
1364 m_GTiffDataset.reset();
1365 auto fp = FileManager::open_resource_file(ctx, m_name.c_str());
1366 if (!fp) {
1367 return false;
1368 }
1369 auto newGS = open(ctx, std::move(fp), m_name);
1370 if (newGS) {
1371 m_grids = std::move(newGS->m_grids);
1372 m_GTiffDataset = std::move(newGS->m_GTiffDataset);
1373 }
1374 return !m_grids.empty();
1375 }
1376};
1377
1378// ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

pj_logFunction · 0.85
resetMethod · 0.80
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected