Skip to content

Commit 3ccaf13

Browse files
committed
ogr2ogr: adjust tests for -wrapdateline w.r.t derived geographic CRS
1 parent 4025efa commit 3ccaf13

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/ogr2ogr_lib.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6072,7 +6072,8 @@ SetupCT(TargetLayerInfo *psInfo, OGRLayer *poSrcLayer, bool bTransform,
60726072
if (bWrapDateline)
60736073
{
60746074
if (bTransform && poCT != nullptr && poOutputSRS != nullptr &&
6075-
poOutputSRS->IsGeographic())
6075+
poOutputSRS->IsGeographic() &&
6076+
!poOutputSRS->IsDerivedGeographic())
60766077
{
60776078
papszTransformOptions =
60786079
CSLAddString(papszTransformOptions, "WRAPDATELINE=YES");
@@ -6084,7 +6085,8 @@ SetupCT(TargetLayerInfo *psInfo, OGRLayer *poSrcLayer, bool bTransform,
60846085
CSLAddString(papszTransformOptions, soOffset);
60856086
}
60866087
}
6087-
else if (poSourceSRS != nullptr && poSourceSRS->IsGeographic())
6088+
else if (poSourceSRS != nullptr && poSourceSRS->IsGeographic() &&
6089+
!poSourceSRS->IsDerivedGeographic())
60886090
{
60896091
papszTransformOptions =
60906092
CSLAddString(papszTransformOptions, "WRAPDATELINE=YES");

0 commit comments

Comments
 (0)