diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-15 14:35:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-15 14:35:31 +0100 |
| commit | 7468536f07d172592889cbb894376a0968afd4df (patch) | |
| tree | a573392f71321588161dd54db732509e57f11f1f /src/4D_api.cpp | |
| parent | 9d8647371d27bdbd717644f7df5514a6f2b07a00 (diff) | |
| parent | 17864e68dc7b34bb730bdc191117e1bd1d5d18ef (diff) | |
| download | PROJ-7468536f07d172592889cbb894376a0968afd4df.tar.gz PROJ-7468536f07d172592889cbb894376a0968afd4df.zip | |
Merge pull request #1813 from rouault/rfc4_network
[RFC4_dev] Add networking capabilities
Diffstat (limited to 'src/4D_api.cpp')
| -rw-r--r-- | src/4D_api.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/4D_api.cpp b/src/4D_api.cpp index efb4a86a..cee8262e 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -262,7 +262,7 @@ similarly, but prefers the 2D resp. 3D interfaces if available. auto coordOperation = dynamic_cast< NS_PROJ::operation::CoordinateOperation*>(alt.pj->iso_obj.get()); if( coordOperation ) { - if( coordOperation->gridsNeeded(dbContext).empty() ) { + if( coordOperation->gridsNeeded(dbContext, true).empty() ) { if( P->iCurCoordOp != i ) { std::string msg("Using coordinate operation "); msg += alt.name; @@ -1117,7 +1117,10 @@ PJ *proj_create_crs_to_crs_from_pj (PJ_CONTEXT *ctx, const PJ *source_crs, cons proj_operation_factory_context_set_spatial_criterion( ctx, operation_ctx, PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION); proj_operation_factory_context_set_grid_availability_use( - ctx, operation_ctx, PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID); + ctx, operation_ctx, + pj_context_is_network_enabled(ctx) ? + PROJ_GRID_AVAILABILITY_KNOWN_AVAILABLE: + PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID); auto op_list = proj_create_operations(ctx, source_crs, target_crs, operation_ctx); |
