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

Method reopen

src/grids.cpp:2823–2838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2821 }
2822
2823 bool reopen(PJ_CONTEXT *ctx) override {
2824 pj_log(ctx, PJ_LOG_DEBUG, "Grid %s has changed. Re-loading it",
2825 m_name.c_str());
2826 m_grids.clear();
2827 m_GTiffDataset.reset();
2828 auto fp = FileManager::open_resource_file(ctx, m_name.c_str());
2829 if (!fp) {
2830 return false;
2831 }
2832 auto newGS = open(ctx, std::move(fp), m_name);
2833 if (newGS) {
2834 m_grids = std::move(newGS->m_grids);
2835 m_GTiffDataset = std::move(newGS->m_GTiffDataset);
2836 }
2837 return !m_grids.empty();
2838 }
2839};
2840
2841// ---------------------------------------------------------------------------

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