Skip to content

Commit

Permalink
Add raster/vector layer dialog: offer Microsoft Azure Data Lake Stora…
Browse files Browse the repository at this point in the history
…ge / vsiadls capability

Fixes qgis#55767
  • Loading branch information
rouault authored and nyalldawson committed Jan 9, 2024
1 parent b066605 commit 48b5b5f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/core/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4106,7 +4106,8 @@ void QgsOgrProvider::invalidateNetworkCache()
if ( mFilePath.startsWith( QLatin1String( "/vsicurl/" ) ) ||
mFilePath.startsWith( QLatin1String( "/vsis3/" ) ) ||
mFilePath.startsWith( QLatin1String( "/vsigs/" ) ) ||
mFilePath.startsWith( QLatin1String( "/vsiaz/" ) ) )
mFilePath.startsWith( QLatin1String( "/vsiaz/" ) ) ||
mFilePath.startsWith( QLatin1String( "/vsiadls/" ) ) )
{
QgsDebugMsgLevel( QString( "Invalidating cache for %1" ).arg( mFilePath ), 3 );
VSICurlPartialClearCache( mFilePath.toUtf8().constData() );
Expand Down
5 changes: 5 additions & 0 deletions src/gui/ogr/qgsogrhelperfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ QString createProtocolURI( const QString &type, const QString &url, const QStrin
uri = url;
uri.prepend( QStringLiteral( "/vsiaz/" ) );
}
else if ( type == QLatin1String( "Microsoft Azure Data Lake Storage" ) )
{
uri = url;
uri.prepend( QStringLiteral( "/vsiadls/" ) );
}
else if ( type == QLatin1String( "Alibaba Cloud OSS" ) )
{
uri = url;
Expand Down
3 changes: 2 additions & 1 deletion src/gui/providers/gdal/qgsgdalsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ QgsGdalSourceSelect::QgsGdalSourceSelect( QWidget *parent, Qt::WindowFlags fl, Q
protocolGroupBox->hide();

QStringList protocolTypes = QStringLiteral( "HTTP/HTTPS/FTP,vsicurl;AWS S3,vsis3;Google Cloud Storage,vsigs" ).split( ';' );
protocolTypes += QStringLiteral( "Microsoft Azure Blob,vsiaz;Alibaba Cloud OSS,vsioss;OpenStack Swift Object Storage,vsiswift" ).split( ';' );
protocolTypes += QStringLiteral( "Microsoft Azure Blob,vsiaz;Microsoft Azure Data Lake Storage,vsiadls;Alibaba Cloud OSS,vsioss;OpenStack Swift Object Storage,vsiswift" ).split( ';' );
for ( int i = 0; i < protocolTypes.count(); i++ )
{
QString protocol = protocolTypes.at( i );
Expand Down Expand Up @@ -99,6 +99,7 @@ bool QgsGdalSourceSelect::isProtocolCloudType()
return ( cmbProtocolTypes->currentText() == QLatin1String( "AWS S3" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Google Cloud Storage" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Microsoft Azure Blob" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Microsoft Azure Data Lake Storage" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Alibaba Cloud OSS" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "OpenStack Swift Object Storage" ) );
}
Expand Down
3 changes: 2 additions & 1 deletion src/gui/providers/ogr/qgsogrsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ QgsOgrSourceSelect::QgsOgrSourceSelect( QWidget *parent, Qt::WindowFlags fl, Qgs

//add protocol drivers
QStringList protocolTypes = QStringLiteral( "HTTP/HTTPS/FTP,vsicurl;AWS S3,vsis3;Google Cloud Storage,vsigs;" ).split( ';' );
protocolTypes += QStringLiteral( "Microsoft Azure Blob,vsiaz;Alibaba Cloud OSS,vsioss;OpenStack Swift Object Storage,vsiswift;WFS3 (experimental),WFS3" ).split( ';' );
protocolTypes += QStringLiteral( "Microsoft Azure Blob,vsiaz;Microsoft Azure Data Lake Storage,vsiadls;Alibaba Cloud OSS,vsioss;OpenStack Swift Object Storage,vsiswift;WFS3 (experimental),WFS3" ).split( ';' );
protocolTypes += QgsProviderRegistry::instance()->protocolDrivers().split( ';' );
for ( int i = 0; i < protocolTypes.count(); i++ )
{
Expand Down Expand Up @@ -167,6 +167,7 @@ bool QgsOgrSourceSelect::isProtocolCloudType()
return ( cmbProtocolTypes->currentText() == QLatin1String( "AWS S3" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Google Cloud Storage" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Microsoft Azure Blob" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Microsoft Azure Data Lake Storage" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "Alibaba Cloud OSS" ) ||
cmbProtocolTypes->currentText() == QLatin1String( "OpenStack Swift Object Storage" ) );
}
Expand Down

0 comments on commit 48b5b5f

Please sign in to comment.