Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

projCtx_t: Copy ini file settings, proj4_init_rules, etc.. when initializing context from global #2331

Merged
merged 5 commits into from
Aug 20, 2020

Conversation

snowman2
Copy link
Contributor

@snowman2 snowman2 commented Aug 20, 2020

  • Tests added
  • Added clear title that can be used to generate release notes

Ran into a couple of other settings that weren't copied from the global context. I figured initializing them here might reduce the overhead of loading in of the data elsewhere when creating new contexts. Thoughts?

@snowman2 snowman2 force-pushed the ctx_proj4_init branch 3 times, most recently from a6b62e1 to eb040aa Compare August 20, 2020 01:39
src/ctx.cpp Outdated Show resolved Hide resolved
test/unit/test_c_api.cpp Outdated Show resolved Hide resolved
test/unit/test_defmodel Outdated Show resolved Hide resolved
test/unit/test_network Outdated Show resolved Hide resolved
@snowman2
Copy link
Contributor Author

Should I also copy defer_grid_opening?

@rouault
Copy link
Member

rouault commented Aug 20, 2020

Should I also copy defer_grid_opening?

This is not necessary. This variable is only transiently set to true at https://github.com/OSGeo/PROJ/blob/master/src/iso19111/c_api.cpp#L186 (you may add a comment about that)

@snowman2
Copy link
Contributor Author

you may add a comment about that

There is a comment // set by pj_obj_create(). So, I think it should be okay. Thanks for clarifying 👍

@rouault
Copy link
Member

rouault commented Aug 20, 2020

// set by pj_obj_create()

Maybe "// set transiently by pj_obj_create()" ?

@rouault rouault merged commit bc1dcf2 into OSGeo:master Aug 20, 2020
@rouault rouault added this to the 7.2.0 milestone Aug 20, 2020
@snowman2 snowman2 deleted the ctx_proj4_init branch August 20, 2020 15:55
@snowman2
Copy link
Contributor Author

Thanks for the review @rouault. Very helpful 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants