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

Method reopen

src/grids.cpp:2370–2385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2368 }
2369
2370 bool reopen(PJ_CONTEXT *ctx) override {
2371 pj_log(ctx, PJ_LOG_DEBUG, "Grid %s has changed. Re-loading it",
2372 m_name.c_str());
2373 m_grids.clear();
2374 m_GTiffDataset.reset();
2375 auto fp = FileManager::open_resource_file(ctx, m_name.c_str());
2376 if (!fp) {
2377 return false;
2378 }
2379 auto newGS = open(ctx, std::move(fp), m_name);
2380 if (newGS) {
2381 m_grids = std::move(newGS->m_grids);
2382 m_GTiffDataset = std::move(newGS->m_GTiffDataset);
2383 }
2384 return !m_grids.empty();
2385 }
2386};
2387
2388// ---------------------------------------------------------------------------

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