27 #include "../../dataaccess/query/DataSetName.h"
28 #include "../../dataaccess/query/Field.h"
29 #include "../../dataaccess/query/Fields.h"
30 #include "../../dataaccess/query/From.h"
31 #include "../../dataaccess/query/FromItem.h"
32 #include "../../dataaccess/query/Select.h"
33 #include "../../dataaccess/query/SpatialQueryProcessor.h"
34 #include "../../dataaccess/query/Where.h"
35 #include "../../dataaccess/utils/Utils.h"
36 #include "../../datatype/DateTime.h"
37 #include "../../datatype/DateTimePeriod.h"
38 #include "../../maptools/Exception.h"
39 #include "../../maptools/RendererFactory.h"
40 #include "../core/observation/ObservationDataSet.h"
41 #include "../core/trajectory/TrajectoryDataSetInfo.h"
42 #include "../core/trajectory/TrajectoryDataSet.h"
43 #include "../loader/STDataLoader.h"
47 #include <boost/format.hpp>
69 const std::string& title, AbstractLayer* parent,
82 assert(!m_info->getObservationDataSetInfo().getDataSetName().empty());
86 return ds->getDataSetType(m_info->getObservationDataSetInfo().getDataSetName());
99 std::auto_ptr<te::da::DataSet> result = tds->release();
110 std::auto_ptr<te::da::DataSet> result = tds->release();
121 std::auto_ptr<te::da::DataSet> result = tds->release();
129 std::auto_ptr<te::da::DataSet> result;
137 std::auto_ptr<te::da::DataSet> result;
165 std::auto_ptr<te::da::DataSet> result = tds->release();
175 std::auto_ptr<te::da::DataSet> result = tds->release();
185 std::auto_ptr<te::da::DataSet> result = tds->release();
195 std::auto_ptr<te::st::TrajectoryDataSet>
212 if(m_info->getObservationDataSetInfo().getDataSourceInfo().getId().empty())
225 if(ds.get() == 0 || !ds->isValid() || !ds->isOpened())
233 if(m_rendererType.empty())
234 throw te::map::Exception((boost::format(
TE_TR(
"Could not draw the data set layer %1%. The renderer type is empty!")) % getTitle()).str());
238 if(renderer.get() == 0)
239 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());
241 renderer->draw(
this, canvas, bbox, srid);
251 return m_info->getObservationDataSetInfo().getDataSourceInfo().getId();
257 return m_rendererType;
267 if (m_layers.empty())
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
const std::string & getType() const
It returns the layer type: TRAJECTORYDATASETLAYER.
void draw(te::map::Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the layer geographic objects in the given canvas using the informed SRS. ...
boost::shared_ptr< DataSource > DataSourcePtr
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
SpatialRelation
Spatial relations between geometric objects.
#define TE_TR(message)
It marks a string in order to get translated.
std::auto_ptr< te::st::TrajectoryDataSet > getTrajectoryDataset(te::common::TraverseType travType=te::common::FORWARDONLY) const
std::auto_ptr< LayerSchema > getSchema() const
It returns the layer schema.
This is an abstract class that models a query expression.
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.
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...
bool isValid() const
It returns true if the layer can be used for instance to draw, otherwise, it returns false...
~TrajectoryDataSetLayer()
Destructor.
static const std::string sm_type
A static data member used in the implementation of getType method.
void setRendererType(const std::string &t)
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.
bool hasChilds()
Checks if the layer has any childs.
const std::string & getDataSourceId() const
std::auto_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.
te::dt::DateTimePeriod * getTemporalExtent() const
It returns the layer temporal extent.
A class that contains infos about a DataSet that contains observations of one or more trajectories...
A canvas is an abstraction of a drawing area.
An abstract class to represent a period of date and time.
TrajectoryDataSetLayer(AbstractLayer *parent=0)
It initializes a new layer.
const std::string & getRendererType() const
static std::auto_ptr< ObservationDataSet > getDataSet(const ObservationDataSetInfo &info, te::common::TraverseType travType=te::common::FORWARDONLY)
It returns a ObservationDataSet, that is, a DataSet that contains observations.
A layer with a reference to an TrajectoryDataSet.