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();
A wdiget used to customize a chart's style parameters.
This abstract class describes a basic item to be organized in a tree-oriented way.
A class that models the description of a dataset.
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.
This is the base class for layers.
virtual void select(te::da::ObjectIdSet *oids)
It adds the given oids to the selected group of this Layer.
virtual AbstractLayer * clone()=0
It returns a clone of the object.
virtual void setDataSourceId(const std::string &id)
virtual void updateVisibility()
It updates the visibility of this layer.
te::gm::Envelope m_mbr
The layer bounding box.
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.
virtual const std::string & getId() const
It returns the layer id.
virtual const std::string & getDataSourceId() const
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 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.
virtual void deselect(const te::da::ObjectIdSet *oids)
It removes the given oids from the selected group of this Layer.
std::string m_datasourceId
DataSource id.
void setVisibilityAsChanged(bool visChanged)
It sets that the status of the layer visibility is to be changed or not..
virtual void setTitle(const std::string &title)
It sets the layer title.
te::core::EncodingType m_encoding
The char encoding of the layer.
virtual void clearSelected()
It clears the selected group of this Layer.
int m_srid
The identifier of the layer spatial reference system.
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
bool m_isValid
Last verify state flag.
virtual const std::string & getTitle() const
It returns the layer title.
bool hasVisibilityChanged()
It gets the flag that indicates if the layer visibility has changed.
virtual void setVisibility(Visibility v)
It sets the layer visibility.
te::map::CompositionMode m_compositionMode
The composition mode used to merged the canvas.
virtual bool isValid() const =0
It returns true if the layer can be used for instance to draw, otherwise, it returns false.
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::string m_geomPropertyName
The name of the referenced geometry property.
std::string m_datasetName
The dataset name where we will retrieve the layer objects.
std::vector< te::map::AbstractLayer * > getDescendants()
It returns a list with the descendants of this layer.
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.
te::se::Style * m_selectionStyle
The selection style to be applied to the geographic objects in the layer.
virtual const std::string & getType() const =0
It returns the layer type.
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.
void updateVisibilityOfAncestors()
It updates the visibility of the ancestors of this layer, if any.
virtual std::unique_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.
te::map::Chart * m_chart
The chart information.
virtual void setChart(te::map::Chart *chart)
It sets the Chart associated to the Layer.
AbstractLayer(const std::string &id, AbstractLayer *parent=0)
It initializes a new layer.
te::map::RasterContrast * m_contrast
The contrast information to be applied to a raster object in the layer.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.
void setEncoding(te::core::EncodingType et)
It set the encoding type.
virtual const std::string & getGeomPropertyName() const
virtual ~AbstractLayer()
Virtual destructor.
void setDataSetName(const std::string &name)
Visibility m_visibility
It indicates the layer visibility.
te::se::Style * m_style
The style to be applied to the geographic objects in the layer.
void setCompositionMode(te::map::CompositionMode mode)
It sets the composition mode.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
virtual te::map::Chart * getChart() const
It returns the Chart associated to the Layer.
AbstractLayer(AbstractLayer *parent=0)
It initializes a new layer.
virtual const te::da::ObjectIdSet * getSelected() const
It returns the selected group of this Layer.
te::core::EncodingType getEncoding() const
It returns the encoding type.
std::string m_id
Layer id.
bool getLastValidatedValue()
Get last datasource verification.
virtual te::map::Grouping * getGrouping() const
It returns the Grouping associated to the Layer.
const std::string & getDataSetName() const
te::map::CompositionMode getCompositionMode() const
It returns the composition mode.
virtual void setGeomPropertytName(const std::string &name)
virtual void setRasterContrast(te::map::RasterContrast *contrast)
It sets the raster contrast associated to the Layer.
AbstractLayer(const std::string &id, const std::string &title, AbstractLayer *parent=0)
It initializes a new layer.
virtual te::se::Style * getSelectionStyle() const
It returns the selection Style associated to the layer.
std::vector< te::map::AbstractLayer * > getAncestors()
It returns a list with the ancestors of this layer.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
virtual void setOutOfDate()
Its indicate that the layer schema is out of date.
virtual void setExtent(const te::gm::Envelope &mbr)
It sets the Layer extent (or minimum bounding box).
std::string m_title
A brief description of this Layer that can be used by applications to show a text identifying this la...
te::da::ObjectIdSet * m_selected
The selected group of the layer.
virtual void setSelectionStyle(te::se::Style *style)
It sets the selection Style associated to the layer.
te::map::Grouping * m_grouping
The grouping information.
virtual void setId(const std::string &id)
It sets the layer id.
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.
bool m_visibilityChanged
It indicates if the layer visibility has changed.
virtual te::map::RasterContrast * getRasterContrast() const
It returns the raster contrast associated to the Layer.
virtual Visibility getVisibility() const
It returns the layer visibility.
A canvas is an abstraction of a drawing area.
This class represents the informations needed to build map charts.
This class contains the parameters needed for grouping the values of a Property.
This class contains the parameters needed to apply dynamic contrast over a raster.
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).
EncodingType
Supported character encodings.
SpatialRelation
Spatial relations between geometric objects.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Visibility
Each layer can have three states of visibility.
CompositionMode
The composition mode used to render the canvas.
te::da::DataSetType LayerSchema
bool operator()(AbstractLayerPtr lhs, AbstractLayerPtr rhs)
Proxy configuration file for TerraView (see terraview_config.h).
Enumerations of XML module.