Skip to content

Commit

Permalink
Don't use (broken) QgsCoordinateReferenceSystem::createFromSrsId method
Browse files Browse the repository at this point in the history
for virtual point clouds

Check the docs for QgsCoordinateReferenceSystem::createFromSrsId, its
use is highly discouraged.
  • Loading branch information
nyalldawson committed Feb 13, 2024
1 parent 8696964 commit e7f5b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/providers/vpc/qgsvirtualpointcloudprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void QgsVirtualPointCloudProvider::parseFile()
if ( !mCrs.isValid() )
{
if ( f["properties"].contains( "proj:epsg" ) )
mCrs.createFromSrsId( f["properties"]["proj:epsg"].get<long>() );
mCrs = QgsCoordinateReferenceSystem( QStringLiteral( "EPSG:%1" ).arg( f["properties"]["proj:epsg"].get<long>() ) );
else if ( f["properties"].contains( "proj:wkt2" ) )
mCrs.createFromString( QString::fromStdString( f["properties"]["proj:wkt2"] ) );
}
Expand Down

0 comments on commit e7f5b6f

Please sign in to comment.