GDAL trying opening WMS config file

This commit is contained in:
Erik Broberg
2016-04-25 16:01:09 -04:00
parent 473c7782c2
commit e6195486ae
5 changed files with 24 additions and 21 deletions

View File

@@ -0,0 +1,8 @@
<GDAL_WMS>
<Service name="TiledWMS">
<ServerUrl>http://map1.vis.earthdata.nasa.gov/twms-geo/twms.cgi?</ServerUrl>
<TiledGroupName>MODIS TERRA tileset</TiledGroupName>
<Change key="${time}">2016-04-12</Change>
</Service>
<MaxConnections>20</MaxConnections>
</GDAL_WMS>

View File

@@ -63,6 +63,7 @@ namespace openspace {
unique_ptr<ProgramObject> _programObject;
TextureTileSet _tileSet;
};

View File

@@ -66,7 +66,7 @@ namespace openspace {
// Mainly for debugging purposes @AA
addProperty(_rotation);
//addSwitchValue(std::shared_ptr<ClipMapGlobe>(new ClipMapGlobe(dictionary)), 1e7);
addSwitchValue(std::shared_ptr<ClipMapGlobe>(new ClipMapGlobe(dictionary)), 1e7);
addSwitchValue(std::shared_ptr<ChunkLodGlobe>(new ChunkLodGlobe(dictionary)), 1e9);
addSwitchValue(std::shared_ptr<GlobeMesh>(new GlobeMesh(dictionary)), 1e10);

View File

@@ -34,8 +34,8 @@
//#include <test_spicemanager.inl>
//#include <test_scenegraphloader.inl>
//#include <test_chunknode.inl>
#include <test_lrucache.inl>
#include <test_twmstileprovider.inl>
//#include <test_lrucache.inl>
//#include <test_twmstileprovider.inl>
//#include <test_luaconversions.inl>
//#include <test_powerscalecoordinates.inl>

View File

@@ -25,38 +25,32 @@
#include "gtest/gtest.h"
#include "gdal.h"
#include "gdal_priv.h"
#include <ogr_spatialref.h>
#include "cpl_conv.h"
#include "cpl_string.h"
//#include "wms/wmsdriver.h"
// Error: cannot open source file "wms/wmsdriver.h"
//#include "wms/wmsdriver.h"
// Error: cannot open source file "wms/wmsmetadataset.h"
//#include "wms/wmsmetadataset.h"
class GdalWmsTest : public testing::Test {};
TEST_F(GdalWmsTest, Simple) {
//GDALRegister_WMS();
GDALDataset *poDataset;
GDALAllRegister();
std::string testFile = absPath("../data/scene/debugglobe/map_service_configs/TERRA_CR_B143_2016-04-12.wms");
poDataset = (GDALDataset *)GDALOpen(testFile.c_str(), GA_ReadOnly);
// This assertion fails
ASSERT_NE(poDataset, nullptr) << "Failed to load testFile";
GDALWMSDataset* wms_dataset = GDALOpen("../test.xml", GA_ReadOnly);
if (wms_dataset)
{
;
}
/*
GDALDataset *poDataset;
GDALAllRegister();
poDataset = (GDALDataset *)GDALOpen("filename", GA_ReadOnly);
if (poDataset == NULL)
{
std::cout << "NULL" << std::endl;
}*/
}