Go to the documentation of this file.
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTLAYER_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTLAYER_H
30 #include "../common/Enums.h"
31 #include "../common/TreeItem.h"
32 #include "../dataaccess/dataset/DataSet.h"
33 #include "../dataaccess/dataset/DataSetType.h"
34 #include "../geometry/Enums.h"
35 #include "../geometry/Envelope.h"
46 namespace dt {
class Property; }
54 namespace gm {
class Geometry; }
56 namespace se {
class Style; }
120 virtual const std::string&
getId()
const;
127 virtual void setId(
const std::string&
id);
372 virtual std::unique_ptr<LayerSchema>
getSchema()
const = 0;
418 virtual std::unique_ptr<te::da::DataSet>
getData(
const std::string& propertyName,
448 virtual std::unique_ptr<te::da::DataSet>
getData(
const std::string& propertyName,
503 virtual const std::string&
getType()
const = 0;
632 return lhs->getTitle() < rhs->getTitle();
639 #endif // __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTLAYER_H
An Envelope defines a 2D rectangular region.
virtual const std::string & getDataSourceId() const
This abstract class describes a basic item to be organized in a tree-oriented way.
virtual void setGeomPropertytName(const std::string &name)
void setDataSetName(const std::string &name)
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
bool hasVisibilityChanged()
It gets the flag that indicates if the layer visibility has changed.
te::map::Grouping * m_grouping
The grouping information.
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 =0
It gets the dataset from the given set of objects identification.
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
virtual void setTitle(const std::string &title)
It sets the layer title.
virtual std::unique_ptr< te::da::DataSet > getData(te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
It gets the dataset identified by the layer name.
virtual void setOutOfDate()
Its indicate that the layer schema is out of date.
te::map::Chart * m_chart
The chart information.
std::string m_datasetName
The dataset name where we will retrieve the layer objects.
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 =0
It gets the dataset identified by the layer name using a spatial filter over the given geometric prop...
std::vector< te::map::AbstractLayer * > getAncestors()
It returns a list with the ancestors of this layer.
virtual te::se::Style * getSelectionStyle() const
It returns the selection Style associated to the layer.
AbstractLayer(const std::string &id, const std::string &title, AbstractLayer *parent=0)
It initializes a new layer.
virtual std::unique_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.
std::string m_geomPropertyName
The name of the referenced geometry property.
TraverseType
A dataset can be traversed in two ways:
virtual void setRasterContrast(te::map::RasterContrast *contrast)
It sets the raster contrast associated to the Layer.
virtual const std::string & getGeomPropertyName() const
virtual void setGrouping(te::map::Grouping *grouping)
It sets the Grouping associated to the Layer.
virtual void setSRID(int srid)
It sets the Spatial Reference System ID associated to the Layer.
std::string m_id
Layer id.
virtual te::map::Chart * getChart() const
It returns the Chart associated to the Layer.
te::map::CompositionMode m_compositionMode
The composition mode used to merged the canvas.
int m_srid
The identifier of the layer spatial reference system.
te::da::ObjectIdSet * m_selected
The selected group of the layer.
virtual void setDataSourceId(const std::string &id)
te::map::CompositionMode getCompositionMode() const
It returns the composition mode.
virtual Visibility getVisibility() const
It returns the layer visibility.
virtual te::map::RasterContrast * getRasterContrast() const
It returns the raster contrast associated to the Layer.
void updateVisibilityOfAncestors()
It updates the visibility of the ancestors of this layer, if any.
Visibility
Each layer can have three states of visibility.
Enumerations of XML module.
This class contains the parameters needed for grouping the values of a Property.
This class represents the informations needed to build map charts.
te::se::Style * m_selectionStyle
The selection style to be applied to the geographic objects in the layer.
virtual const std::string & getId() const
It returns the layer id.
SpatialRelation
Spatial relations between geometric objects.
This is an abstract class that models a query expression.
bool getLastValidatedValue()
Get last datasource verification.
std::string m_title
A brief description of this Layer that can be used by applications to show a text identifying this la...
virtual void setSelectionStyle(te::se::Style *style)
It sets the selection Style associated to the layer.
virtual bool isValid() const =0
It returns true if the layer can be used for instance to draw, otherwise, it returns false.
virtual const te::da::ObjectIdSet * getSelected() const
It returns the selected group of this Layer.
This is the base class for layers.
A canvas is an abstraction of a drawing area.
std::vector< te::map::AbstractLayer * > getDescendants()
It returns a list with the descendants of this layer.
virtual AbstractLayer * clone()=0
It returns a clone of the object.
virtual void select(te::da::ObjectIdSet *oids)
It adds the given oids to the selected group of this Layer.
std::string m_datasourceId
DataSource id.
te::gm::Envelope m_mbr
The layer bounding box.
This class contains the parameters needed to apply dynamic contrast over a raster.
void setEncoding(te::core::EncodingType et)
It set the encoding type.
te::da::DataSetType LayerSchema
virtual ~AbstractLayer()
Virtual destructor.
virtual void updateVisibility()
It updates the visibility of this layer.
A wdiget used to customize a chart's style parameters.
virtual void setExtent(const te::gm::Envelope &mbr)
It sets the Layer extent (or minimum bounding box).
virtual void clearSelected()
It clears the selected group of this Layer.
virtual void draw(Canvas *canvas, const te::gm::Envelope &bbox, int srid, const double &scale, bool *cancel)=0
It draws the layer geographic objects in the given canvas using the informed SRS.
virtual void setChart(te::map::Chart *chart)
It sets the Chart associated to the Layer.
virtual const std::string & getTitle() const
It returns the layer title.
CompositionMode
The composition mode used to render the canvas.
AbstractLayer(const std::string &id, AbstractLayer *parent=0)
It initializes a new layer.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
bool m_isValid
Last verify state flag.
virtual te::map::Grouping * getGrouping() const
It returns the Grouping associated to the Layer.
te::map::RasterContrast * m_contrast
The contrast information to be applied to a raster object in the layer.
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 =0
It gets the dataset identified by the layer name using the given restriction.
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
te::core::EncodingType getEncoding() const
It returns the encoding type.
EncodingType
Supported character encodings.
Proxy configuration file for TerraView (see terraview_config.h).
AbstractLayer(AbstractLayer *parent=0)
It initializes a new layer.
te::se::Style * m_style
The style to be applied to the geographic objects in the layer.
virtual void deselect(const te::da::ObjectIdSet *oids)
It removes the given oids from the selected group of this Layer.
te::core::EncodingType m_encoding
The char encoding of 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 =0
It gets the dataset identified by the layer name using a spatial filter over the specified property.
A class that models the description of a dataset.
void setVisibilityAsChanged(bool visChanged)
It sets that the status of the layer visibility is to be changed or not..
virtual const std::string & getType() const =0
It returns the layer type.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
bool m_visibilityChanged
It indicates if the layer visibility has changed.
virtual void setVisibility(Visibility v)
It sets the layer visibility.
AccessPolicy
Supported data access policies (can be used as bitfield).
const std::string & getDataSetName() const
This class represents a set of unique ids created in the same context. i.e. from the same data set.
void setCompositionMode(te::map::CompositionMode mode)
It sets the composition mode.
bool operator()(AbstractLayerPtr lhs, AbstractLayerPtr rhs)
virtual void setId(const std::string &id)
It sets the layer id.
Visibility m_visibility
It indicates the layer visibility.