mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 12:30:00 -05:00
This commit is contained in:
@@ -445,14 +445,21 @@ void RawTileDataReader::initialize() {
|
||||
GlobeBrowsingModule& module = *global::moduleEngine.module<GlobeBrowsingModule>();
|
||||
|
||||
std::string content = _datasetFilePath;
|
||||
if (module.isCachingEnabled() && FileSys.fileExists(_datasetFilePath)) {
|
||||
// Only replace the 'content' if the dataset is an XML file and we want to do
|
||||
// caching
|
||||
std::ifstream t(_datasetFilePath);
|
||||
std::string c(
|
||||
(std::istreambuf_iterator<char>(t)),
|
||||
std::istreambuf_iterator<char>()
|
||||
);
|
||||
if (module.isCachingEnabled()) {
|
||||
std::string c;
|
||||
if (FileSys.fileExists(_datasetFilePath)) {
|
||||
// Only replace the 'content' if the dataset is an XML file and we want to do
|
||||
// caching
|
||||
std::ifstream t(_datasetFilePath);
|
||||
c.append(
|
||||
(std::istreambuf_iterator<char>(t)),
|
||||
std::istreambuf_iterator<char>()
|
||||
);
|
||||
}
|
||||
else {
|
||||
//GDAL input case for configuration string (e.g. temporal data)
|
||||
c = _datasetFilePath;
|
||||
}
|
||||
|
||||
if (c.size() > 10 && c.substr(0, 10) == "<GDAL_WMS>") {
|
||||
// We know that _datasetFilePath is an XML file, so now we add a Cache line
|
||||
|
||||
Reference in New Issue
Block a user