te::map::QueryLayerRenderer Class Reference

It renders the objects associated to a query layer. More...

#include <QueryLayerRenderer.h>

Inheritance diagram for te::map::QueryLayerRenderer:
te::map::AbstractRenderer

Public Member Functions

void draw (AbstractLayer *layer, 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 SRS informed. More...
 
 QueryLayerRenderer ()
 
 ~QueryLayerRenderer ()
 Destructor. More...
 

Private Member Functions

void buildChart (const Chart *chart, te::da::DataSet *dataset, te::gm::Geometry *geom)
 
void buildChart (const Chart *chart, const std::map< std::string, double > &chartValue, te::gm::Geometry *geom)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void drawLayerLinkedGroupingMem (AbstractLayer *layer, const std::string &geomPropertyName, Canvas *canvas, const te::gm::Envelope &bbox, int srid)
 
void reset ()
 

Private Attributes

std::vector< te::gm::Coord2Dm_chartCoordinates
 
std::vector< te::color::RGBAColor ** > m_chartImages
 
std::size_t m_index
 
std::vector< std::string > m_oid
 
te::sam::rtree::Index< std::size_t, 8 > m_rtree
 
WorldDeviceTransformer m_transformer
 

Detailed Description

It renders the objects associated to a query layer.

See also
AbstractLayer, AbstractRenderer, DataSetLayerRenderer, Canvas, te::se::Style, QueryLayer

Definition at line 76 of file QueryLayerRenderer.h.

Constructor & Destructor Documentation

te::map::QueryLayerRenderer::QueryLayerRenderer ( )

Constructor

Definition at line 85 of file QueryLayerRenderer.cpp.

References ~QueryLayerRenderer().

te::map::QueryLayerRenderer::~QueryLayerRenderer ( )
default

Destructor.

Referenced by QueryLayerRenderer().

Member Function Documentation

void te::map::QueryLayerRenderer::draw ( AbstractLayer layer,
Canvas canvas,
const te::gm::Envelope bbox,
int  srid,
const double &  scale,
bool cancel 
)
virtual

It draws the layer geographic objects in the given canvas using the SRS informed.

The informed bounding box (bbox) is used to constraint the Layer objects to be drawn. The bbox coordinates must be in the Spatial Reference System given by srid.

Parameters
layerThe layer that will be drawn.
canvasThe canvas were the layer objects will be drawn.
bboxThe interest area to render the map.
sridThe SRS to be used to draw the layer objects.
scaleThe current scale to draw the layer.

Implements te::map::AbstractRenderer.

Definition at line 92 of file QueryLayerRenderer.cpp.

References te::se::CreateCoverageStyle(), te::se::CreateFeatureTypeStyle(), drawLayerGeometries(), drawLayerGroupingMem(), te::map::DrawRaster(), te::rst::RasterProperty::getBandProperties(), te::map::AbstractLayer::getData(), te::map::AbstractLayer::getExtent(), te::da::GetFirstGeomProperty(), te::da::GetFirstRasterProperty(), te::gm::GeometryProperty::getGeometryType(), te::map::AbstractLayer::getGeomPropertyName(), te::map::AbstractLayer::getGrouping(), te::map::Canvas::getHeight(), te::dt::Property::getName(), te::map::AbstractLayer::getRasterContrast(), te::map::AbstractLayer::getSchema(), te::map::AbstractLayer::getSRID(), te::map::AbstractLayer::getStyle(), te::map::AbstractLayer::getTitle(), te::map::Canvas::getWidth(), te::gm::Envelope::intersection(), te::gm::INTERSECTS, te::gm::Envelope::intersects(), te::gm::Envelope::isValid(), te::map::Grouping::isVisible(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, m_transformer, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, reset(), te::map::AbstractLayer::setStyle(), te::map::WorldDeviceTransformer::setTransformationParameters(), te::map::Canvas::setWindow(), TE_TR, TE_UNKNOWN_SRS, and te::gm::Envelope::transform().

void te::map::QueryLayerRenderer::drawDatSetGeometries ( te::da::DataSet dataset,
const std::size_t &  gpos,
Canvas canvas,
int  fromSRID,
int  toSRID,
Chart chart,
te::common::TaskProgress task = 0 
)
private

It draws the data set geometries in the given canvas using the informed SRS.

Parameters
datasetThe data set that will be drawn.
gposThe geometry property position that will be drawn.
canvasThe canvas were the data set geometries will be drawn.
fromSRIDThe SRID of data set geometries.
sridThe SRID to be used to draw the data set geometries.
chartChart informations that can be used.
taskAn optional task that can be used cancel the draw process.

Definition at line 996 of file QueryLayerRenderer.cpp.

References buildChart(), te::map::Canvas::draw(), te::map::Canvas::drawImage(), te::common::Free(), te::da::DataSet::getAsString(), te::da::DataSet::getGeometry(), te::map::Chart::getHeight(), te::map::Chart::getProperties(), te::map::Chart::getPropertiesPos(), te::da::GetPropertyPos(), te::da::GetSummarizedValue(), te::map::Chart::getSummary(), te::da::GetValueAsDouble(), te::map::Chart::getWidth(), te::common::TaskProgress::isActive(), te::da::DataSet::isAtBegin(), te::da::DataSet::isNull(), m_chartCoordinates, m_chartImages, m_oid, te::da::DataSet::moveNext(), te::common::TaskProgress::pulse(), te::map::Chart::setPropertiesPos(), te::gm::Geometry::setSRID(), TE_UNKNOWN_SRS, and te::gm::Geometry::transform().

Referenced by drawLayerGeometries().

void te::map::QueryLayerRenderer::drawLayerGeometries ( AbstractLayer layer,
const std::string &  geomPropertyName,
te::se::FeatureTypeStyle style,
Canvas canvas,
const te::gm::Envelope bbox,
int  srid 
)
private

It draws the abstract layer in the given canvas using the SRS informed.

The informed bounding box (bbox) is used to constraint the layer objects to be drawn. Here, we assume that the given bbox was pre-processed. i.e. the bbox was clipped and contains the same projection of abstract layer.

Parameters
layerThe abstract layer that will be drawn.
geomPropertyNameThe geometry property name that will be drawn.
styleThe style that will be used.
canvasThe canvas were the layer objects will be drawn.
bboxThe interest area to render the map.
sridThe SRS to be used to draw the layer objects.
Note
This method consider that the given layer contains vetorial data.

Definition at line 229 of file QueryLayerRenderer.cpp.

References te::da::Select::clone(), te::map::CanvasConfigurer::config(), te::se::CreateSymbolizer(), te::common::TaskProgress::DRAW, drawDatSetGeometries(), te::map::AbstractLayer::getChart(), te::map::AbstractLayer::getData(), te::map::QueryEncoder::getExpression(), te::se::Rule::getFilter(), te::da::GetPropertyPos(), te::map::QueryLayer::getQuery(), te::se::Style::getRule(), te::se::Style::getRules(), te::map::AbstractLayer::getSchema(), te::map::AbstractLayer::getSRID(), te::se::Rule::getSymbolizers(), te::map::AbstractLayer::getTitle(), te::da::HasLinkedTable(), te::gm::INTERSECTS, m_oid, te::se::Rule::push_back(), te::da::Select::setOrderBy(), te::map::QueryLayer::setQuery(), and TE_TR.

Referenced by draw().

void te::map::QueryLayerRenderer::drawLayerGrouping ( AbstractLayer layer,
const std::string &  geomPropertyName,
Canvas canvas,
const te::gm::Envelope bbox,
int  srid 
)
private

It draws the grouping of the abstract layer in the given canvas using the SRS informed.

The informed bounding box (bbox) is used to constraint the layer objects to be drawn. Here, we assume that the given bbox was pre-processed. i.e. the bbox was clipped and contains the same projection of abstract layer.

Parameters
layerThe abstract layer that will be drawn.
geomPropertyNameThe geometry property name that will be drawn.
canvasThe canvas were the layer objects will be drawn.
bboxThe interest area to render the map.
sridThe SRS to be used to draw the layer objects.
Note
This method consider that the given layer contains vetorial data.

Definition at line 395 of file QueryLayerRenderer.cpp.

void te::map::QueryLayerRenderer::drawLayerGroupingMem ( AbstractLayer layer,
const std::string &  geomPropertyName,
Canvas canvas,
const te::gm::Envelope bbox,
int  srid 
)
private

It draws the grouping of the abstract layer in the given canvas using the SRS informed.

The informed bounding box (bbox) is used to constraint the layer objects to be drawn. Here, we assume that the given bbox was pre-processed. i.e. the bbox was clipped and contains the same projection of abstract layer.

Parameters
layerThe abstract layer that will be drawn.
geomPropertyNameThe geometry property name that will be drawn.
canvasThe canvas were the layer objects will be drawn.
bboxThe interest area to render the map.
sridThe SRS to be used to draw the layer objects.
Note
This method consider that the given layer contains vetorial data.
This method retrieves the layer data using only spatial extent restriction and performs the grouping in memory.

Definition at line 402 of file QueryLayerRenderer.cpp.

References buildChart(), te::map::CanvasConfigurer::config(), te::common::TaskProgress::DRAW, te::map::Canvas::draw(), te::map::Canvas::drawImage(), drawLayerLinkedGroupingMem(), dt, te::common::Free(), te::map::AbstractLayer::getChart(), te::map::AbstractLayer::getData(), te::se::Rule::getFilter(), te::fe::GetFilterStepValues(), te::fe::GetFilterUniqueValue(), te::map::AbstractLayer::getGrouping(), te::map::Chart::getHeight(), te::map::Grouping::getPrecision(), te::map::Grouping::getPropertyName(), te::da::GetPropertyPos(), te::se::Style::getRules(), te::map::AbstractLayer::getSchema(), te::map::AbstractLayer::getSRID(), te::map::AbstractLayer::getStyle(), te::map::Grouping::getSummary(), te::se::Rule::getSymbolizers(), te::map::AbstractLayer::getTitle(), te::map::Grouping::getType(), te::map::Chart::getWidth(), te::da::HasLinkedTable(), if(), te::gm::INTERSECTS, m_chartCoordinates, m_chartImages, te::common::Globals::sm_nanStr, TE_TR, TE_UNKNOWN_SRS, and te::map::UNIQUE_VALUE.

Referenced by draw().

void te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem ( AbstractLayer layer,
const std::string &  geomPropertyName,
Canvas canvas,
const te::gm::Envelope bbox,
int  srid 
)
private
void te::map::QueryLayerRenderer::reset ( )
private

Definition at line 1316 of file QueryLayerRenderer.cpp.

References m_chartCoordinates, m_chartImages, and m_index.

Referenced by draw().

Member Data Documentation

std::vector<te::gm::Coord2D> te::map::QueryLayerRenderer::m_chartCoordinates
private
std::vector<te::color::RGBAColor**> te::map::QueryLayerRenderer::m_chartImages
private
std::size_t te::map::QueryLayerRenderer::m_index
private

Definition at line 184 of file QueryLayerRenderer.h.

Referenced by buildChart(), and reset().

std::vector<std::string> te::map::QueryLayerRenderer::m_oid
private
te::sam::rtree::Index<std::size_t, 8> te::map::QueryLayerRenderer::m_rtree
private

Definition at line 183 of file QueryLayerRenderer.h.

Referenced by buildChart().

WorldDeviceTransformer te::map::QueryLayerRenderer::m_transformer
private

Definition at line 182 of file QueryLayerRenderer.h.

Referenced by buildChart(), and draw().


The documentation for this class was generated from the following files: