Issue/1250 Increase timeout for gdal http and updated url for loading gibs (#3015)

* increase timeout for gdal http requests and updated url for loading gibs data

* revertingurl change as its no longer redirecting for me

* fixed includes, moved setting long time out to only when we load capabilities

* removed comment

* refix include

closes #1250
This commit is contained in:
Micah Acinapura
2024-02-27 10:31:10 -05:00
committed by GitHub
parent 2fbcb0544e
commit d13974f289
2 changed files with 3 additions and 2 deletions

View File

@@ -46,5 +46,3 @@ return {
}
}
-- https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html

View File

@@ -83,6 +83,7 @@
#pragma warning (disable : 4251)
#endif // _MSC_VER
#include <cpl_conv.h>
#include <cpl_string.h>
#ifdef _MSC_VER
@@ -550,10 +551,12 @@ void GlobeBrowsingModule::loadWMSCapabilities(std::string name, std::string glob
{
auto downloadFunction = [](const std::string& downloadUrl) {
LDEBUG("Opening WMS capabilities: " + downloadUrl);
CPLSetConfigOption("GDAL_HTTP_TIMEOUT", "15"); // 3 seconds
GDALDatasetH dataset = GDALOpen(
downloadUrl.c_str(),
GA_ReadOnly
);
CPLSetConfigOption("GDAL_HTTP_TIMEOUT", "3"); // 3 seconds
if (!dataset) {
LWARNING("Could not open dataset: " + downloadUrl);