mirror of
https://github.com/qgis/QGIS.git
synced 2025-07-04 00:02:42 -04:00
Compare commits
2 Commits
2353f539bc
...
2d27aa12f0
Author | SHA1 | Date | |
---|---|---|---|
|
2d27aa12f0 | ||
|
e2983d2be8 |
@ -70,12 +70,15 @@ void QgsCopcPointCloudIndex::load( const QString &urlString )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mUri = urlString;
|
|
||||||
|
|
||||||
if ( mAccessType == Qgis::PointCloudAccessType::Remote )
|
if ( mAccessType == Qgis::PointCloudAccessType::Remote )
|
||||||
mLazInfo.reset( new QgsLazInfo( QgsLazInfo::fromUrl( url ) ) );
|
mLazInfo.reset( new QgsLazInfo( QgsLazInfo::fromUrl( url ) ) );
|
||||||
else
|
else
|
||||||
mLazInfo.reset( new QgsLazInfo( QgsLazInfo::fromFile( mCopcFile ) ) );
|
mLazInfo.reset( new QgsLazInfo( QgsLazInfo::fromFile( mCopcFile ) ) );
|
||||||
|
|
||||||
|
// now store the uri as it might have been updated due to redirects
|
||||||
|
mUri = url.toString();
|
||||||
|
|
||||||
mIsValid = mLazInfo->isValid();
|
mIsValid = mLazInfo->isValid();
|
||||||
if ( mIsValid )
|
if ( mIsValid )
|
||||||
{
|
{
|
||||||
|
@ -327,6 +327,13 @@ QgsLazInfo QgsLazInfo::fromUrl( QUrl &url )
|
|||||||
QByteArray lazHeaderData = reply.content();
|
QByteArray lazHeaderData = reply.content();
|
||||||
|
|
||||||
lazInfo.parseRawHeader( lazHeaderData.data(), lazHeaderData.size() );
|
lazInfo.parseRawHeader( lazHeaderData.data(), lazHeaderData.size() );
|
||||||
|
|
||||||
|
// If request was redirected, let's update our url for all next calls
|
||||||
|
const QUrl requestedUrl = reply.request().url();
|
||||||
|
if ( requestedUrl != url )
|
||||||
|
{
|
||||||
|
url.setUrl( requestedUrl.toString() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch VLR data
|
// Fetch VLR data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user