27 #include "../../../../core/logger/Logger.h" 28 #include "../../../../core/translator/Translator.h" 29 #include "../../../../dataaccess/dataset/DataSetType.h" 30 #include "../../../../dataaccess/datasource/DataSourceManager.h" 31 #include "../../../../dataaccess/utils/Utils.h" 32 #include "../../../../maptools/AbstractLayer.h" 33 #include "../../../../srs/SpatialReferenceSystemManager.h" 34 #include "../../../widgets/layer/utils/DataSet2Layer.h" 35 #include "../../../af/ApplicationController.h" 36 #include "../../../af/events/LayerEvents.h" 40 #include <QApplication> 43 #include <QMessageBox> 49 #include <boost/uuid/random_generator.hpp> 50 #include <boost/uuid/uuid_io.hpp> 51 #include <boost/filesystem.hpp> 55 std::list<te::map::AbstractLayerPtr> layers;
57 for (std::size_t t = 0; t < vec.size(); ++t)
62 boost::uuids::basic_random_generator<boost::mt19937> gen;
63 boost::uuids::uuid u = gen();
64 std::string
id = boost::uuids::to_string(u);
69 dsInfo->setAccessDriver(
"GDAL");
70 dsInfo->setConnInfo(info.
m_uri);
71 dsInfo->setDescription(
"A PostGIS Raster");
74 dsInfo->setType(
"GDALPOSTGISRASTER");
91 catch (std::exception&)
93 QMessageBox::warning(
nullptr,
TE_TR(
"PostGIS Raster"),
TE_TR(
"There were issues while reading the layer from the requested PostGIS Raster."));
boost::shared_ptr< DataSetType > DataSetTypePtr
boost::shared_ptr< DataSource > DataSourcePtr
This event signals that a list of layers have been created.
static te::dt::Date ds(2010, 01, 01)
#define TE_TR(message)
It marks a string in order to get translated.
static DataSourceInfoManager & getInstance()
It returns a reference to the singleton instance.
Utility functions for the data access module.
std::vector< PostGISRasterInfo > PostGISRasterInfoVec
void CreateLayers(PostGISRasterInfoVec &vec)
A class that represents a data source component.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr