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

Function pj_create_argv_internal

src/create.cpp:288–311  ·  view source on GitHub ↗

/

Source from the content-addressed store, hash-verified

286
287/*************************************************************************************/
288PJ *pj_create_argv_internal(PJ_CONTEXT *ctx, int argc, char **argv) {
289 /**************************************************************************************
290 For use by pipeline init function.
291 **************************************************************************************/
292 if (nullptr == ctx)
293 ctx = pj_get_default_ctx();
294 if (nullptr == argv) {
295 proj_context_errno_set(ctx, PROJ_ERR_INVALID_OP_MISSING_ARG);
296 return nullptr;
297 }
298
299 /* ...and let pj_init_ctx do the hard work */
300 /* New interface: forbid init=epsg:XXXX syntax by default */
301 const int allow_init_epsg =
302 proj_context_get_use_proj4_init_rules(ctx, FALSE);
303 PJ *P = pj_init_ctx_with_allow_init_epsg(ctx, argc, argv, allow_init_epsg);
304
305 /* Support cs2cs-style modifiers */
306 int ret = cs2cs_emulation_setup(P);
307 if (0 == ret)
308 return proj_destroy(P);
309
310 return P;
311}

Callers 3

pipeline.cppFile · 0.85
pj_create_internalFunction · 0.85
PJ_PROJECTIONFunction · 0.85

Calls 6

pj_get_default_ctxFunction · 0.85
proj_context_errno_setFunction · 0.85
cs2cs_emulation_setupFunction · 0.85
proj_destroyFunction · 0.85

Tested by

no test coverage detected