26 #ifndef __TERRALIB_GRAPH_INTERNAL_LAYER_H
27 #define __TERRALIB_GRAPH_INTERNAL_LAYER_H
30 #include "../../maptools/AbstractLayer.h"
31 #include "../Config.h"
39 namespace gm {
class Envelope; }
76 Layer(
const std::string&
id,
const std::string& title, AbstractLayer* parent = 0);
81 AbstractLayer*
clone() {
return nullptr; }
90 virtual std::unique_ptr<te::da::DataSetType>
getSchema()
const;
136 virtual std::unique_ptr<te::da::DataSet>
getData(
const std::string& propertyName,
166 virtual std::unique_ptr<te::da::DataSet>
getData(
const std::string& propertyName,
This is an abstract class that models a query expression.
This class represents a set of unique ids created in the same context. i.e. from the same data set.
An Envelope defines a 2D rectangular region.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
It renders the objects associated to a Layer.
A Layer is a reference to a virtual dataset with/without geometric attributes.
virtual std::unique_ptr< te::da::DataSet > getData(const te::da::ObjectIdSet *oids, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const
It gets the dataset from the given set of objects identification.
Layer(const std::string &id, const std::string &title, AbstractLayer *parent=0)
It initializes a new Layer.
virtual std::unique_ptr< te::da::DataSet > getData(const std::string &propertyName, const te::gm::Geometry *g, te::gm::SpatialRelation r, 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 using a spatial filter over the given geometric prop...
virtual const std::string & getType() const
It returns the layer type.
std::unique_ptr< LayerRenderer > m_renderer
A pointer to the internal renderer used to paint this layer.
te::graph::AbstractGraph * m_graph
The graph associated to this Layer.
te::graph::AbstractGraph * getGraph() const
It returns the graph associated to the layer.
virtual bool isValid() const
It returns true if the layer can be drawn, otherwise, it returns false.
virtual 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.
static const std::string sm_type
A static data member used in the implementation of getType method.
virtual std::unique_ptr< te::da::DataSet > getData(te::da::Expression *restriction, 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 using the given restriction.
LayerRenderer * getRenderer() const
It returns the renderer used to paint this layer.
AbstractLayer * clone()
It returns a clone of the object.
virtual 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.
virtual std::unique_ptr< te::da::DataSetType > getSchema() const
It returns the layer schema.
void setRenderer(LayerRenderer *renderer)
It sets the renderer used to paint this layer.
void setGraph(te::graph::AbstractGraph *ds)
It sets the graph associated to the layer.
virtual std::unique_ptr< te::da::DataSet > getData(const std::string &propertyName, const te::gm::Envelope *e, te::gm::SpatialRelation r=te::gm::INTERSECTS, 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 using a spatial filter over the specified property.
This is the base class for layers.
A canvas is an abstraction of a drawing area.
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
TraverseType
A dataset can be traversed in two ways:
AccessPolicy
Supported data access policies (can be used as bitfield).
SpatialRelation
Spatial relations between geometric objects.
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.