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

Method gridAt

src/transformations/defmodel.cpp:220–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 : ctx(ctxIn), realGridSet(std::move(realGridSetIn)) {}
219
220 const Grid *gridAt(double x, double y) {
221 const NS_PROJ::GenericShiftGrid *realGrid = realGridSet->gridAt(x, y);
222 if (!realGrid) {
223 return nullptr;
224 }
225 auto iter = mapGrids.find(realGrid);
226 if (iter == mapGrids.end()) {
227 iter = mapGrids
228 .insert(std::pair<const NS_PROJ::GenericShiftGrid *,
229 std::unique_ptr<Grid>>(
230 realGrid,
231 std::unique_ptr<Grid>(new Grid(ctx, realGrid))))
232 .first;
233 }
234 return iter->second.get();
235 }
236
237 private:
238 GridSet(const GridSet &) = delete;

Callers 2

forwardMethod · 0.45
findGridMethod · 0.45

Calls 3

endMethod · 0.80
insertMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected