#include "MapToolsExamples.h"#include <terralib/common.h>#include <terralib/geometry.h>#include <terralib/dataaccess.h>#include <terralib/maptools.h>#include <terralib/se.h>#include <terralib/qt/widgets/canvas/Canvas.h>#include <cassert>#include <iostream>#include <memory>#include <vector>#include <QApplication>#include <QDialog>#include <QLabel>Go to the source code of this file.
Functions | |
| te::map::DataSetLayer * | CreateDataSetLayer (const std::string &path) |
| void | Draw (te::map::DataSetLayer *layer) |
| void | DrawStyledLayers () |
| It draws a set of layers using styles encoded using OGC Symbology Enconding specification. More... | |
Polygon Styles | |
| te::se::Style * | SimplePolygonStyle () |
| te::se::Style * | SimplePolygonStyleWithStroke () |
| te::se::Style * | TransparentPolygonStyle () |
| te::se::Style * | GraphicFillPolygonStyle (const std::string &markName) |
| te::se::Style * | TreePolygonStyle () |
| te::se::Style * | GraphicFillContourPolygonStyle (const std::string &markName) |
Line Styles | |
| te::se::Style * | SimpleLineStyle () |
| te::se::Style * | DashedLineStyle () |
| te::se::Style * | LineWithBorderStyle () |
| te::se::Style * | RoadStyleOne () |
| te::se::Style * | RoadStyleTwo () |
Point Styles | |
| te::se::Style * | MarkPointStyle (const std::string &markName) |
| te::map::DataSetLayer* CreateDataSetLayer | ( | const std::string & | path | ) |
Definition at line 264 of file Styling.cpp.
References te::common::Convert2String(), dt, G_ID, te::da::GetFirstGeomProperty(), te::common::Singleton< DataSourceManager >::getInstance(), te::map::AbstractLayer::setDataSetName(), te::map::AbstractLayer::setDataSourceId(), te::map::AbstractLayer::setExtent(), and te::map::DataSetLayer::setRendererType().
Referenced by DrawStyledLayers().
| te::se::Style* DashedLineStyle | ( | ) |
Definition at line 165 of file Styling.cpp.
References te::se::CreateLineSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| void Draw | ( | te::map::DataSetLayer * | layer | ) |
Definition at line 297 of file Styling.cpp.
References te::map::DataSetLayer::draw(), te::map::AbstractLayer::getExtent(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, and TE_OPAQUE.
Referenced by DrawStyledLayers().
| void DrawStyledLayers | ( | ) |
It draws a set of layers using styles encoded using OGC Symbology Enconding specification.
Definition at line 325 of file Styling.cpp.
References CreateDataSetLayer(), DashedLineStyle(), Draw(), te::common::Singleton< MarkRendererManager >::getInstance(), GraphicFillContourPolygonStyle(), GraphicFillPolygonStyle(), LineWithBorderStyle(), MarkPointStyle(), RoadStyleOne(), RoadStyleTwo(), te::map::AbstractLayer::setStyle(), SimpleLineStyle(), SimplePolygonStyle(), SimplePolygonStyleWithStroke(), TransparentPolygonStyle(), and TreePolygonStyle().
| te::se::Style* GraphicFillContourPolygonStyle | ( | const std::string & | markName | ) |
Definition at line 123 of file Styling.cpp.
References te::se::CreateFill(), te::se::CreateGraphic(), te::se::CreateMark(), te::se::CreatePolygonSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* GraphicFillPolygonStyle | ( | const std::string & | markName | ) |
Definition at line 72 of file Styling.cpp.
References te::se::CreateFill(), te::se::CreateGraphic(), te::se::CreateMark(), te::se::CreatePolygonSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* LineWithBorderStyle | ( | ) |
Definition at line 179 of file Styling.cpp.
References te::se::CreateLineSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* MarkPointStyle | ( | const std::string & | markName | ) |
Definition at line 244 of file Styling.cpp.
References te::se::CreateFill(), te::se::CreateGraphic(), te::se::CreateMark(), te::se::CreatePointSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers(), and MapDisplay().
| te::se::Style* RoadStyleOne | ( | ) |
Definition at line 197 of file Styling.cpp.
References te::se::CreateLineSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* RoadStyleTwo | ( | ) |
Definition at line 219 of file Styling.cpp.
References te::se::CreateLineSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* SimpleLineStyle | ( | ) |
Definition at line 150 of file Styling.cpp.
References te::se::CreateLineSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers(), and MapDisplay().
| te::se::Style* SimplePolygonStyle | ( | ) |
Definition at line 24 of file Styling.cpp.
References te::se::CreateFill(), te::se::Style::push_back(), te::se::Rule::push_back(), and te::se::PolygonSymbolizer::setFill().
Referenced by DrawStyledLayers(), and MapDisplay().
| te::se::Style* SimplePolygonStyleWithStroke | ( | ) |
Definition at line 40 of file Styling.cpp.
References te::se::CreateFill(), te::se::CreatePolygonSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* TransparentPolygonStyle | ( | ) |
Definition at line 56 of file Styling.cpp.
References te::se::CreateFill(), te::se::CreatePolygonSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().
| te::se::Style* TreePolygonStyle | ( | ) |
Definition at line 95 of file Styling.cpp.
References te::se::CreateFill(), te::se::CreateGraphic(), te::se::CreateMark(), te::se::CreatePolygonSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by DrawStyledLayers().