Skip to content

Commit

Permalink
Fix East and West coordinates were flipped
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed May 16, 2024
1 parent 5347611 commit a278540
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/plugins/grass/qgsgrassnewmapset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,15 +768,15 @@ void QgsGrassNewMapset::setSelectedRegion()
const QgsCoordinateReferenceSystem source( QStringLiteral( "EPSG:4326" ) );
if ( !source.isValid() )
{
QgsGrass::warning( tr( "Cannot create QgsCoordinateReferenceSystem" ) );
QgsGrass::warning( tr( "Cannot create Coordinate Reference System" ) );
return;
}

QgsCoordinateReferenceSystem dest = mProjectionSelector->crs();

if ( !dest.isValid() )
{
QgsGrass::warning( tr( "Cannot create QgsCoordinateReferenceSystem" ) );
QgsGrass::warning( tr( "Cannot create Coordinate Reference System" ) );
return;
}

Expand Down Expand Up @@ -882,8 +882,8 @@ void QgsGrassNewMapset::drawRegion()
const QgsRectangle extent = mExtentWidget->outputExtent();
double n = extent.yMaximum();
double s = extent.yMinimum();
double e = extent.xMinimum();
double w = extent.xMaximum();
double e = extent.xMaximum();
double w = extent.xMinimum();

// Shift if LL and W > E
if ( mCellHead.proj == PROJECTION_LL && w > e )
Expand Down Expand Up @@ -931,15 +931,15 @@ void QgsGrassNewMapset::drawRegion()

if ( !source.isValid() )
{
QgsGrass::warning( tr( "Cannot create QgsCoordinateReferenceSystem" ) );
QgsGrass::warning( tr( "Cannot create Coordinate Reference System" ) );
return;
}

QgsCoordinateReferenceSystem dest = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );

if ( !dest.isValid() )
{
QgsGrass::warning( tr( "Cannot create QgsCoordinateReferenceSystem" ) );
QgsGrass::warning( tr( "Cannot create Coordinate Reference System" ) );
return;
}

Expand Down

0 comments on commit a278540

Please sign in to comment.