28 #include "../../dataaccess/query/DataSetName.h" 29 #include "../../dataaccess/query/Field.h" 30 #include "../../dataaccess/query/Fields.h" 31 #include "../../dataaccess/query/From.h" 32 #include "../../dataaccess/query/FromItem.h" 33 #include "../../dataaccess/query/Select.h" 34 #include "../../dataaccess/query/SpatialQueryProcessor.h" 35 #include "../../dataaccess/query/Where.h" 36 #include "../../dataaccess/utils/Utils.h" 37 #include "../../maptools/Exception.h" 38 #include "../../maptools/RendererFactory.h" 39 #include "../core/observation/ObservationDataSet.h" 40 #include "../core/observation/ObservationDataSetInfo.h" 41 #include "../loader/STDataLoader.h" 45 #include <boost/format.hpp> 73 assert(!
m_info->getDataSetName().empty());
77 return ds->getDataSetType(
m_info->getDataSetName());
91 std::unique_ptr<te::da::DataSet> result = ods->release();
101 std::unique_ptr<te::da::DataSet> result = ods->release();
111 std::unique_ptr<te::da::DataSet> result = ods->release();
119 std::unique_ptr<te::da::DataSet> result;
127 std::unique_ptr<te::da::DataSet> result;
156 std::unique_ptr<te::da::DataSet> result = ods->release();
167 std::unique_ptr<te::da::DataSet> result = ods->release();
178 std::unique_ptr<te::da::DataSet> result = ods->release();
188 std::unique_ptr<te::st::ObservationDataSet>
211 throw te::map::Exception((boost::format(
TE_TR(
"Could not draw the data set layer %1%. The renderer type is empty!")) %
getTitle()).str());
215 if(renderer.get() == 0)
216 throw te::map::Exception((boost::format(
TE_TR(
"Could not draw the data set layer %1%. The renderer %2% could not be created!")) %
getTitle() %
m_rendererType).str());
218 renderer->draw(
this, canvas, bbox, srid, scale, cancel);
228 return m_info->getDataSourceInfo().getId();
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
std::unique_ptr< ObservationDataSetInfo > m_info
Infos about the data source and its data set that contains observations.
boost::shared_ptr< DataSource > DataSourcePtr
A class that contains infos about a DataSet that contains observations.
virtual const std::string & getTitle() const
It returns the layer title.
bool isValid() const
It returns true if the layer can be used for instance to draw, otherwise, it returns false...
te::dt::DateTimePeriod * getTemporalExtent() const
It returns the layer temporal extent.
std::unique_ptr< te::st::ObservationDataSet > getObservationDataset(te::common::TraverseType travType=te::common::FORWARDONLY) const
void setRendererType(const std::string &t)
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
SpatialRelation
Spatial relations between geometric objects.
static te::dt::Date ds(2010, 01, 01)
#define TE_TR(message)
It marks a string in order to get translated.
This is an abstract class that models a query expression.
static const std::string sm_type
A static data member used in the implementation of getType method.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
A layer with reference to a dataset that contains spatiotemporal data.
std::unique_ptr< te::da::DataSet > getData(te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const
It gets the dataset identified by the layer name.
An Envelope defines a 2D rectangular region.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
A layer with a reference to an ObservationDataSet.
~ObservationDataSetLayer()
Destructor.
static te::dt::TimeDuration dt(20, 30, 50, 11)
const std::string & getType() const
It returns the layer type: OBSERVATIONDATASETLAYER.
const std::string & getDataSourceId() const
std::string m_rendererType
A pointer to the internal renderer used to paint this layer.
static std::unique_ptr< ObservationDataSet > getDataSet(const ObservationDataSetInfo &info, te::common::TraverseType travType=te::common::FORWARDONLY)
It returns a ObservationDataSet, that is, a DataSet that contains observations.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
static AbstractRenderer * make(const std::string &factoryKey)
It creates an object with the appropriated factory.
A canvas is an abstraction of a drawing area.
std::unique_ptr< LayerSchema > getSchema() const
It returns the layer schema.
const std::string & getRendererType() const
An abstract class to represent a period of date and time.
void draw(te::map::Canvas *canvas, const te::gm::Envelope &bbox, int srid, const double &scale, bool *cancel)
It draws the layer geographic objects in the given canvas using the informed SRS. ...
AbstractLayer(AbstractLayer *parent=0)
It initializes a new layer.
ObservationDataSetLayer(AbstractLayer *parent, ObservationDataSetInfo *info)
It initializes a new layer.