File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ void ConcatenatedOperation::fixStepsDirection(
373
373
auto derivedCRS = extractDerivedCRS (concatOpTargetCRS.get ());
374
374
if (derivedCRS) {
375
375
if (i >= 1 ) {
376
- // use the sourceCRS of the previous operation as our source
376
+ // use the targetCRS of the previous operation as our source
377
377
// CRS
378
378
l_sourceCRS = operationsInOut[i - 1 ]->targetCRS ();
379
379
// except if it looks like the previous operation should
@@ -385,7 +385,9 @@ void ConcatenatedOperation::fixStepsDirection(
385
385
areCRSMoreOrLessEquivalent (
386
386
operationsInOut[i - 1 ]->sourceCRS ().get (),
387
387
derivedCRS->baseCRS ().get ())) {
388
- l_targetCRS = operationsInOut[i - 1 ]->sourceCRS ();
388
+ l_sourceCRS = operationsInOut[i - 1 ]->sourceCRS ();
389
+ operationsInOut[i - 1 ] =
390
+ operationsInOut[i - 1 ]->inverse ();
389
391
}
390
392
}
391
393
if (!l_sourceCRS) {
Original file line number Diff line number Diff line change @@ -218,8 +218,8 @@ CoordinateOperation::targetCoordinateEpoch() const {
218
218
219
219
void CoordinateOperation::setWeakSourceTargetCRS (
220
220
std::weak_ptr<crs::CRS> sourceCRSIn, std::weak_ptr<crs::CRS> targetCRSIn) {
221
- d->sourceCRSWeak_ = sourceCRSIn;
222
- d->targetCRSWeak_ = targetCRSIn;
221
+ d->sourceCRSWeak_ = std::move ( sourceCRSIn) ;
222
+ d->targetCRSWeak_ = std::move ( targetCRSIn) ;
223
223
}
224
224
225
225
// ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments