-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix proj_assign_context()/pj_set_ctx() with pipelines and alternative…
… coord operations Fixes OSGeo/gdal#1989 pj_set_ctx() only changes the context to the main object. It should also recurse down to the steps of the pipeline and the alternative coordinate operations hold in alternativeCoordinateOperations In the GDAL use case with multithreaded reprojection, and objects being transferred between thread, this would cause a failed coordinate transformation to affect an unrelated transformation of another thread...
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ Thomas Knudsen, [email protected], 2016-05-20 | |
#include "geodesic.h" | ||
#include "proj.h" | ||
#include "proj_internal.h" | ||
#include "proj_experimental.h" | ||
|
||
PROJ_HEAD(pipeline, "Transformation pipeline manager"); | ||
PROJ_HEAD(pop, "Retrieve coordinate value from pipeline stack"); | ||
|
@@ -136,7 +137,11 @@ static PJ_LPZ pipeline_reverse_3d (PJ_XYZ xyz, PJ *P); | |
static PJ_XY pipeline_forward (PJ_LP lp, PJ *P); | ||
static PJ_LP pipeline_reverse (PJ_XY xy, PJ *P); | ||
|
||
|
||
void pj_pipeline_assign_context_to_steps( PJ* P, PJ_CONTEXT* ctx ) | ||
{ | ||
for (int i = 1; i <= static_cast<struct pj_opaque*>(P->opaque)->steps; i++) | ||
proj_assign_context(static_cast<struct pj_opaque*>(P->opaque)->pipeline[i], ctx); | ||
} | ||
|
||
|
||
static PJ_COORD pipeline_forward_4d (PJ_COORD point, PJ *P) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters