27 #include "../color/RGBAColor.h"
28 #include "../common/progress/TaskProgress.h"
29 #include "../common/Globals.h"
30 #include "../common/STLUtils.h"
31 #include "../common/StringUtils.h"
32 #include "../common/Translator.h"
33 #include "../dataaccess/dataset/DataSet.h"
34 #include "../dataaccess/dataset/DataSetType.h"
35 #include "../dataaccess/query/And.h"
36 #include "../dataaccess/query/EqualTo.h"
37 #include "../dataaccess/query/GreaterThanOrEqualTo.h"
38 #include "../dataaccess/query/LessThanOrEqualTo.h"
39 #include "../dataaccess/query/LiteralDouble.h"
40 #include "../dataaccess/query/LiteralEnvelope.h"
41 #include "../dataaccess/query/LiteralString.h"
42 #include "../dataaccess/query/PropertyName.h"
43 #include "../dataaccess/query/ST_Intersects.h"
44 #include "../dataaccess/utils/Utils.h"
45 #include "../fe/Filter.h"
46 #include "../geometry/Coord2D.h"
47 #include "../geometry/Envelope.h"
48 #include "../geometry/GeometryProperty.h"
49 #include "../geometry/MultiPolygon.h"
50 #include "../geometry/Polygon.h"
51 #include "../raster/Raster.h"
52 #include "../raster/RasterProperty.h"
53 #include "../se/FeatureTypeStyle.h"
54 #include "../se/CoverageStyle.h"
55 #include "../se/Rule.h"
56 #include "../se/Utils.h"
57 #include "../srs/Config.h"
70 #include "../dataaccess/query/OrderBy.h"
71 #include "../dataaccess/query/OrderByItem.h"
72 #include "../dataaccess/query/Select.h"
75 #include <boost/format.hpp>
76 #include <boost/lexical_cast.hpp>
77 #include <boost/math/special_functions/round.hpp>
100 throw Exception(
TE_TR(
"The requested box is invalid!"));
113 throw Exception(
TE_TR(
"The reprojected box is invalid!"));
115 else if(layer->
getSRID() != srid)
117 throw Exception(
TE_TR(
"The layer or map don't have a valid SRID!"));
134 std::auto_ptr<LayerSchema> schema(layer->
getSchema());
135 assert(schema.get());
140 if(schema->hasGeom())
144 if(spatialPropertyName.empty())
149 assert(geometryProperty);
155 drawLayerGroupingMem(layer, geometryProperty->
getName(), canvas, ibbox, srid);
167 throw Exception((boost::format(
TE_TR(
"Could not create a default feature type style to the layer %1%.")) % layer->
getTitle()).str());
175 throw Exception(
TE_TR(
"The layer style is not a Feature Type Style!"));
177 drawLayerGeometries(layer, geometryProperty->
getName(), fts, canvas, ibbox, srid);
179 else if(schema->hasRaster())
183 if(spatialPropertyName.empty())
188 assert(rasterProperty);
198 throw Exception((boost::format(
TE_TR(
"Could not create a default coverage style to the layer %1%.")) % layer->
getTitle()).str());
206 throw Exception(
TE_TR(
"The layer style is not a Coverage Style!"));
211 if(dataset.get() == 0)
212 throw Exception((boost::format(
TE_TR(
"Could not retrieve the data set from the layer %1%.")) % layer->
getTitle()).str());
215 std::auto_ptr<te::rst::Raster> raster(dataset->getRaster(rasterProperty->
getName()));
216 if(dataset.get() == 0)
217 throw Exception((boost::format(
TE_TR(
"Could not retrieve the raster from the layer %1%.")) % layer->
getTitle()).str());
224 throw Exception(
TE_TR(
"The layer don't have a geometry or raster property!"));
229 const std::string& geomPropertyName,
235 assert(!geomPropertyName.empty());
249 std::auto_ptr<te::da::DataSetType> schema = layer->
getSchema();
250 std::vector<te::dt::Property*> props = schema->getPrimaryKey()->getProperties();
252 while(++pksize < props.size())
254 m_oid.push_back(props[pksize-1]->getName());
255 if(props[pksize-1]->getDatasetName() != props[pksize]->getDatasetName())
259 for(
size_t i = 0; i < pksize; ++i)
270 std::size_t nRules = style->
getRules().size();
272 for(std::size_t i = 0; i < nRules; ++i)
284 std::auto_ptr<te::da::DataSet> dataset(0);
295 catch(std::exception& )
310 throw Exception(
TE_TR(
"Could not convert the OGC Filter expression to TerraLib expression!"));
323 dataset = layer->
getData(restriction);
327 catch(std::exception& )
333 if(dataset.get() == 0)
334 throw Exception((boost::format(
TE_TR(
"Could not retrieve the data set from the layer %1%.")) % layer->
getTitle()).str());
336 if(dataset->moveNext() ==
false)
340 const std::vector<te::se::Symbolizer*>& symbolizers = rule->
getSymbolizers();
343 std::string message =
TE_TR(
"Drawing the layer");
344 message +=
" " + layer->
getTitle() +
". ";
345 message +=
TE_TR(
"Rule");
346 message +=
" " + boost::lexical_cast<std::string>(i + 1) +
" " +
TE_TR(
"of") +
" ";
347 message += boost::lexical_cast<std::string>(nRules) +
".";
356 if(symbolizers.empty())
359 std::auto_ptr<te::gm::Geometry> g(dataset->getGeometry(gpos));
367 dataset->moveFirst();
370 std::size_t nSymbolizers = symbolizers.size();
372 for(std::size_t j = 0; j < nSymbolizers; ++j)
381 if(j != nSymbolizers - 1)
382 drawDatSetGeometries(dataset.get(), gpos, canvas, layer->
getSRID(), srid, 0, &task);
384 drawDatSetGeometries(dataset.get(), gpos, canvas, layer->
getSRID(), srid, layer->
getChart(), &task);
387 dataset->moveFirst();
395 const std::string& geomPropertyName,
532 const std::string& geomPropertyName,
537 assert(!geomPropertyName.empty());
541 drawLayerLinkedGroupingMem(layer, geomPropertyName, canvas, bbox, srid);
553 assert(!propertyName.empty());
559 const std::size_t& precision = grouping->
getPrecision();
564 std::size_t nGroupItems = items.size();
567 std::map<std::string, std::vector<te::se::Symbolizer*> > uniqueGroupsMap;
570 std::map<std::pair< double, double>, std::vector<te::se::Symbolizer*> > othersGroupsMap;
572 for(std::size_t i = 0; i < nGroupItems; ++i)
586 std::pair<double, double> range(lowerLimit, upperLimit);
593 std::string message =
TE_TR(
"Drawing the grouping of layer");
594 message +=
" " + layer->
getTitle() +
".";
599 std::auto_ptr<te::da::DataSet> dataset(0);
604 catch(std::exception& )
609 if(dataset.get() == 0)
610 throw Exception((boost::format(
TE_TR(
"Could not retrieve the data set from the layer %1%.")) % layer->
getTitle()).str());
612 if(dataset->moveNext() ==
false)
619 std::auto_ptr<te::map::LayerSchema> dt(layer->
getSchema());
623 bool needRemap =
false;
632 std::vector<te::se::Symbolizer*> symbolizers;
634 if(dataset->isNull(propertyPos) ==
false)
640 std::string svalue = dataset->getAsString(propertyPos, precision);
641 std::map<std::string, std::vector<te::se::Symbolizer*> >::const_iterator it = uniqueGroupsMap.find(svalue);
642 if(it == uniqueGroupsMap.end())
644 symbolizers = it->second;
649 std::map<std::pair< double, double>, std::vector<te::se::Symbolizer*> >::const_iterator it;
650 for(it = othersGroupsMap.begin(); it != othersGroupsMap.end(); ++it)
652 if(dvalue >= it->first.first && dvalue <= it->first.second)
656 if(it == othersGroupsMap.end())
671 symbolizers = it->second;
674 if(symbolizers.empty())
692 std::auto_ptr<te::gm::Geometry> geom;
695 geom = dataset->getGeometry(gpos);
699 catch(std::exception& )
705 std::size_t nSymbolizers = symbolizers.size();
707 for(std::size_t j = 0; j < nSymbolizers; ++j)
718 geom->setSRID(layer->
getSRID());
719 geom->transform(srid);
722 canvas->
draw(geom.get());
724 if(chart && j == nSymbolizers - 1)
725 buildChart(chart, dataset.get(), geom.get());
728 }
while(dataset->moveNext());
731 for(std::size_t i = 0; i < m_chartCoordinates.size(); ++i)
733 canvas->
drawImage(static_cast<int>(m_chartCoordinates[i].x),
734 static_cast<int>(m_chartCoordinates[i].y),
744 const std::string& geomPropertyName,
749 assert(!geomPropertyName.empty());
756 std::auto_ptr<te::da::DataSetType> schema = layer->
getSchema();
757 std::vector<te::dt::Property*> props = schema->getPrimaryKey()->getProperties();
759 while(++pksize < props.size())
761 m_oid.push_back(props[pksize-1]->getName());
762 if(props[pksize-1]->getDatasetName() != props[pksize]->getDatasetName())
767 for(
size_t i = 0; i < pksize; ++i)
782 assert(!propertyName.empty());
788 const std::size_t& precision = grouping->
getPrecision();
791 const std::string gfunction = grouping->
getSummary();
796 std::size_t nGroupItems = items.size();
799 std::map<std::string, std::vector<te::se::Symbolizer*> > uniqueGroupsMap;
802 std::map<std::pair< double, double>, std::vector<te::se::Symbolizer*> > othersGroupsMap;
804 for(std::size_t i = 0; i < nGroupItems; ++i)
818 std::pair<double, double> range(lowerLimit, upperLimit);
825 std::string message =
TE_TR(
"Drawing the grouping of layer");
826 message +=
" " + layer->
getTitle() +
".";
831 std::auto_ptr<te::da::DataSet> dataset(0);
837 catch(std::exception& )
842 if(dataset.get() == 0)
843 throw Exception((boost::format(
TE_TR(
"Could not retrieve the data set from the layer %1%.")) % layer->
getTitle()).str());
845 if(dataset->moveNext() ==
false)
852 std::auto_ptr<te::map::LayerSchema> dt(layer->
getSchema());
857 bool needRemap =
false;
861 std::vector<std::string> pkdata(pksize), pkdataaux(pksize);
862 std::vector<double> values;
864 std::vector<std::string> svalues;
871 std::string cfunction;
872 std::map<std::string, std::vector<double> > chartValues;
873 std::map<std::string, double> chartValue;
874 bool hasGroupNullValue =
false;
875 bool hasGroupNullValueAux =
false;
876 bool hasChartNullValue =
false;
877 bool hasChartNullValueAux =
false;
883 std::vector<size_t> propPos;
884 for(std::size_t i = 0; i < csize; ++i)
886 std::vector<double> v;
899 geomaux = dataset->getGeometry(gpos).release();
903 catch(std::exception& )
908 std::vector<te::se::Symbolizer*> symbolizers;
912 for(i = 0; i < pksize; ++i)
913 pkdata[i] = dataset->getAsString(m_oid[i]);
915 for(i = 0; i < pksize; ++i)
917 if(dataset->isAtBegin())
918 pkdataaux[i] = dataset->getAsString(m_oid[i]);
921 if(pkdata[i] != pkdataaux[i])
931 if(hasGroupNullValue ==
false && dataset->isNull(propertyPos) ==
false)
936 svalues.push_back(dataset->getAsString(propertyPos, precision));
944 hasGroupNullValue =
true;
946 if(hasChartNullValue ==
false)
948 for(std::size_t i = 0; i < csize; ++i)
952 hasChartNullValue =
true;
956 if(hasChartNullValue ==
false)
958 for(std::size_t i = 0; i < csize; ++i)
974 if(hasGroupNullValue ==
false)
982 svalue = boost::lexical_cast<std::string>(value);
987 std::map<std::string, std::vector<te::se::Symbolizer*> >::const_iterator it = uniqueGroupsMap.find(svalue);
988 if(it == uniqueGroupsMap.end())
990 symbolizers = it->second;
997 std::map<std::pair<double, double>, std::vector<te::se::Symbolizer*> >::const_iterator it;
998 for(it = othersGroupsMap.begin(); it != othersGroupsMap.end(); ++it)
1000 if(value >= it->first.first && value <= it->first.second)
1004 if(it == othersGroupsMap.end())
1018 symbolizers = it->second;
1035 if(hasChartNullValue ==
false)
1037 for(std::size_t i = 0; i < csize; ++i)
1044 geomaux = dataset->getGeometry(gpos).release();
1046 catch(std::exception& )
1052 for(std::size_t i = 0; i < csize; ++i)
1057 if(dataset->isNull(propertyPos) ==
false)
1062 svalues.push_back(dataset->getAsString(propertyPos, precision));
1070 hasGroupNullValueAux =
true;
1072 for(std::size_t i = 0; i < csize; ++i)
1076 hasChartNullValueAux =
true;
1080 if(hasChartNullValueAux ==
false)
1082 for(std::size_t i = 0; i < csize; ++i)
1088 std::size_t nSymbolizers = symbolizers.size();
1090 for(std::size_t j = 0; j < nSymbolizers; ++j)
1107 if(chart && hasChartNullValue ==
false && j == nSymbolizers - 1)
1108 buildChart(chart, chartValue, geom);
1111 hasChartNullValue = hasChartNullValueAux;
1112 hasGroupNullValue = hasGroupNullValueAux;
1113 hasChartNullValueAux =
false;
1114 hasGroupNullValueAux =
false;
1115 }
while(dataset->moveNext());
1120 std::vector<te::se::Symbolizer*> symbolizers;
1121 if(hasGroupNullValue ==
false)
1129 svalue = boost::lexical_cast<std::string>(value);
1134 std::map<std::string, std::vector<te::se::Symbolizer*> >::const_iterator it = uniqueGroupsMap.find(svalue);
1135 if(it != uniqueGroupsMap.end())
1136 symbolizers = it->second;
1143 std::map<std::pair<double, double>, std::vector<te::se::Symbolizer*> >::const_iterator it;
1144 for(it = othersGroupsMap.begin(); it != othersGroupsMap.end(); ++it)
1146 if(value >= it->first.first && value <= it->first.second)
1150 if(it == othersGroupsMap.end())
1163 symbolizers = it->second;
1167 if(hasChartNullValue ==
false)
1169 for(std::size_t i = 0; i < csize; ++i)
1176 std::size_t nSymbolizers = symbolizers.size();
1178 if(hasGroupNullValue ==
false)
1181 for(std::size_t j = 0; j < nSymbolizers; ++j)
1198 if(chart && hasChartNullValue ==
false && j == nSymbolizers - 1)
1199 buildChart(chart, chartValue, geom);
1202 if(nSymbolizers == 0 && chart && hasChartNullValue ==
false)
1203 buildChart(chart, chartValue, geom);
1208 for(std::size_t i = 0; i < m_chartCoordinates.size(); ++i)
1210 canvas->
drawImage(static_cast<int>(m_chartCoordinates[i].x),
1211 static_cast<int>(m_chartCoordinates[i].y),
1221 int fromSRID,
int toSRID,
1228 size_t pksize = m_oid.size();
1229 std::vector<std::string> pkdata(pksize), pkdataaux(pksize);
1232 bool needRemap =
false;
1237 std::string cfunction;
1238 std::map<std::string, std::vector<double> > chartValues;
1239 std::map<std::string, double> chartValue;
1240 bool hasChartNullValue =
false;
1241 bool hasChartNullValueAux =
false;
1247 std::vector<size_t> propPos;
1248 for(std::size_t i = 0; i < csize; ++i)
1250 std::vector<double> v;
1267 catch(std::exception& )
1276 for(i = 0; i < pksize; ++i)
1279 for(i = 0; i < pksize; ++i)
1285 if(pkdata[i] != pkdataaux[i])
1294 if(hasChartNullValue ==
false)
1297 for(std::size_t i = 0; i < csize; ++i)
1303 hasChartNullValue =
true;
1314 if(hasChartNullValue ==
false)
1316 for(std::size_t i = 0; i < csize; ++i)
1321 for(std::size_t i = 0; i < csize; ++i)
1324 hasChartNullValueAux =
false;
1325 for(std::size_t i = 0; i < csize; ++i)
1329 hasChartNullValueAux =
true;
1333 if(hasChartNullValueAux ==
false)
1335 for(std::size_t i = 0; i < csize; ++i)
1343 for(std::size_t i = 0; i < csize; ++i)
1350 hasChartNullValue =
true;
1364 catch(std::exception& )
1388 if(chart && hasChartNullValue ==
false)
1389 buildChart(chart, chartValue, geom);
1391 hasChartNullValue = hasChartNullValueAux;
1392 hasChartNullValueAux =
false;
1406 if(chart && hasChartNullValue ==
false)
1408 if(chartValues.empty() ==
false)
1410 for(std::size_t i = 0; i < csize; ++i)
1415 buildChart(chart, chartValue, geom);
1420 for(std::size_t i = 0; i < m_chartCoordinates.size(); ++i)
1422 canvas->
drawImage(static_cast<int>(m_chartCoordinates[i].x),
1423 static_cast<int>(m_chartCoordinates[i].y),
1454 double dx = 0.0;
double dy = 0.0;
1455 m_transformer.world2Device(worldCoord->x, worldCoord->y, dx, dy);
1457 double dw = dx + chart->
getWidth();
1466 std::vector<std::size_t> report;
1467 m_rtree.search(chartEnvelope, report);
1473 m_rtree.insert(chartEnvelope, ++m_index);
1480 std::size_t width = 0;
1482 m_chartImages.push_back(rgba);
1507 double dx = 0.0;
double dy = 0.0;
1508 m_transformer.world2Device(worldCoord->x, worldCoord->y, dx, dy);
1510 double dw = dx + chart->
getWidth();
1519 std::vector<std::size_t> report;
1520 m_rtree.search(chartEnvelope, report);
1526 m_rtree.insert(chartEnvelope, ++m_index);
1533 std::size_t width = 0;
1535 m_chartImages.push_back(rgba);
1541 m_chartCoordinates.clear();
1542 m_chartImages.clear();
TEDATAACCESSEXPORT te::rst::RasterProperty * GetFirstRasterProperty(const DataSetType *dt)
MultiPolygon is a MultiSurface whose elements are Polygons.
const std::vector< std::string > & getProperties() const
Utility functions for the data access module.
bool intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
Spatial intersects operator.
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
std::string getSummary() const
It gets the grouping summary. It is used only in case 1 to n.
TESEEXPORT Symbolizer * CreateSymbolizer(const te::gm::GeomType &geomType)
Try creates an appropriate symbolizer based on given geometry type.
const std::string & getValue() const
It gets the value of the legend item.
virtual const std::string & getTitle() const
It returns the layer title.
TEDATAACCESSEXPORT bool HasLinkedTable(te::da::DataSetType *type)
It checks if the datasettype has a linked table.
A class that models the name of any property of an object.
const size_t getPrecision() const
It gets the precision used for the property values.
A Symbolizer describes how a feature is to appear on a map.
void draw(AbstractLayer *layer, Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the layer geographic objects in the given canvas using the SRS informed. ...
A visitor that converts a OGC Filter Expression to TerraLib Expression.
virtual int getHeight() const =0
It returns the canvas height.
The CoverageStyle defines the styling that is to be applied to a subset of Coverage data...
This is the base class for Layers.
std::string getPropertyName() const
It gets the property name whose values will be grouped.
TESEEXPORT Style * CreateCoverageStyle(const std::vector< te::rst::BandProperty * > &properties)
Try creates an appropriate coverage style based on given band properties.
This class can be used to inform the progress of a task.
TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet *dataset, const std::string &name)
This is a singleton for managing chart renderer instance available in the system. ...
double m_urx
Upper right corner x-coordinate.
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause.
te::da::Expression * getExpression(const te::fe::Filter *f)
It converts the OGC Filter Expression to a TerraLib Expression.
virtual void transform(int srid)=0
It converts the coordinate values of the geometry to the new spatial reference system.
A layer resulting from a query.
virtual int getWidth() const =0
It returns the canvas width.
An utility struct for representing 2D coordinates.
TEDATAACCESSEXPORT double GetValueAsDouble(const te::da::DataSet *ds, const size_t pos)
It gets the value as double.
const te::fe::Filter * getFilter() const
#define TE_TR(message)
It marks a string in order to get translated.
void push_back(Symbolizer *s)
It renders the objects associated to a query layer.
bool isActive() const
Verify if the task is active.
Boolean logic operator: AND.
This is an abstract class that models a query expression.
virtual te::map::Chart * getChart() const
It returns the Chart associated to the Layer.
TESEEXPORT Style * CreateFeatureTypeStyle(const te::gm::GeomType &geomType)
Try creates an appropriate feature type style based on given geometry type.
Rule * getRule(std::size_t i) const
const std::vector< Rule * > & getRules() const
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
~QueryLayerRenderer()
Destructor.
This class contains the parameters needed for grouping the values of a Property.
Coord2D getCenter() const
It returns the rectangle's center coordinate.
void Free(std::vector< T * > *v)
This function can be applied to a pointer to a vector of pointers.
void drawLayerGeometries(AbstractLayer *layer, const std::string &geomPropertyName, te::se::FeatureTypeStyle *style, Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the abstract layer in the given canvas using the SRS informed.
double m_llx
Lower left corner x-coordinate.
void drawDatSetGeometries(te::da::DataSet *dataset, const std::size_t &gpos, Canvas *canvas, int fromSRID, int toSRID, Chart *chart, te::common::TaskProgress *task=0)
It draws the data set geometries in the given canvas using the informed SRS.
This class represents the informations needed to build map charts.
static T & getInstance()
It returns a reference to the singleton instance.
void buildChart(const Chart *chart, te::da::DataSet *dataset, te::gm::Geometry *geom)
An Envelope defines a 2D rectangular region.
A GroupingItem contains information about a grouping item associated to a layer.
The FeatureTypeStyle defines the styling that is to be applied to a dataset that can be viewed as a f...
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
void drawLayerGrouping(AbstractLayer *layer, const std::string &geomPropertyName, Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the grouping of the abstract layer in the given canvas using the SRS informed.
virtual bool isNull(std::size_t i) const =0
It checks if the attribute value is NULL.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
std::size_t getHeight() const
bool isVisible() const
It gets the chart visibility.
GeomType getGeometryType() const
It returns the geometry subtype allowed for the property.
virtual std::auto_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.
A visitor that converts a OGC Filter Expression to TerraLib Expression.
TEDATAACCESSEXPORT double GetSummarizedValue(std::vector< double > &values, const std::string &summary)
It gets the summarized value.
void pulse()
Calls setCurrentStep() function using getCurrentStep() + 1.
virtual std::string getAsString(std::size_t i, int precision=0) const
Method for retrieving a data value as a string plain representation.
virtual void drawImage(char *src, std::size_t size, ImageType t)=0
It draws the src image over the canvas.
te::da::Select * getQuery() const
A filter is any valid predicate expression.
Query * clone() const
It creates a new copy of this query.
This class represents the informations needed to build map charts.
GeomType getGeomTypeId() const
It returns the geometry subclass type identifier.
void setOrderBy(OrderBy *o)
It sets the list of expressions used to sort the output result.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A Select models a query to be used when retrieving data from a DataSource.
virtual std::auto_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
TEDATAACCESSEXPORT double Round(const double &value, const size_t &precision)
It gets the round value.
const std::vector< Symbolizer * > & getSymbolizers() const
double m_lly
Lower left corner y-coordinate.
void setPropertiesPos(const std::vector< size_t > &propPos)
A dataset is the unit of information manipulated by the data access module of TerraLib.
A canvas is an abstraction of a drawing area.
bool isVisible() const
It gets the grouping visibility.
const std::vector< te::map::GroupingItem * > & getGroupingItems() const
It gets the vector of grouping items.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
GroupingType
The grouping type associated to the layer.
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
const std::string & getUpperLimit() const
It gets the upper limit value of the legend item.
const std::vector< size_t > & getPropertiesPos() const
virtual te::map::Grouping * getGrouping() const
It returns the Grouping associated to the Layer.
double m_ury
Upper right corner y-coordinate.
void setQuery(te::da::Select *s)
std::string getSummary() const
It gets the grouping summary. It is used only in case 1 to n.
Coord2D * getCentroidCoord() const
It returns the mathematical centroid for this surface as a coordinate.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
const GroupingType getType() const
It gets the grouping type.
bool getAvoidConflicts() const
A layer resulting from a query.
A class that models a literal for Envelope values.
virtual const std::string & getGeomPropertyName() const
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
This class contains the parameters needed for grouping the values of a Property.
std::vector< te::rst::BandProperty * > & getBandProperties()
Returns a reference to the list of bands definitions.
Envelope intersection(const Envelope &rhs) const
It returns an envelope that represents the point set intersection with another envelope.
void drawLayerGroupingMem(AbstractLayer *layer, const std::string &geomPropertyName, Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the grouping of the abstract layer in the given canvas using the SRS informed.
A class that can be used in an ORDER BY clause to sort the items of a resulting query.
virtual bool isAtBegin() const =0
It tells if the dataset internal pointer is on the first element of the collection or not...
const std::string & getLowerLimit() const
It gets the lower limit value of the legend item.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
const std::vector< te::se::Symbolizer * > & getSymbolizers() const
It gets the symbolizer of the legend item.
void transform(int oldsrid, int newsrid)
It will transform the coordinates of the Envelope from the old SRS to the new one.
virtual void draw(const te::gm::Geometry *geom)=0
It draws the geometry on canvas.
const Envelope * getMBR() const
It returns the minimum bounding rectangle for the geometry in an internal representation.
bool isValid() const
It tells if the rectangle is valid or not.
virtual void setSRID(int srid)=0
It sets the Spatial Reference System ID of the geometry and all its parts if it is a GeometryCollecti...
TEMAPEXPORT void DrawRaster(te::da::DataSetType *type, te::da::DataSourcePtr ds, Canvas *canvas, const te::gm::Envelope &bbox, int bboxSRID, const te::gm::Envelope &visibleArea, int srid, te::se::CoverageStyle *style)
Coord2D * getCentroidCoord() const
std::size_t getWidth() const
virtual std::auto_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.
const std::string & getName() const
It returns the property name.
void drawLayerLinkedGroupingMem(AbstractLayer *layer, const std::string &geomPropertyName, Canvas *canvas, const te::gm::Envelope &bbox, int srid)