27 #include "../../common/STLUtils.h"
28 #include "../../datatype/Enums.h"
29 #include "../../geometry/LineString.h"
30 #include "../../geometry/Point.h"
31 #include "../../maptools/AbstractLayer.h"
32 #include "../../maptools/Canvas.h"
33 #include "../../maptools/CanvasConfigurer.h"
34 #include "../../maptools/MarkRendererManager.h"
35 #include "../../se/Mark.h"
36 #include "../../se/Style.h"
37 #include "../../se/Rule.h"
38 #include "../../se/Utils.h"
39 #include "../core/AbstractGraph.h"
40 #include "../core/Edge.h"
41 #include "../core/Vertex.h"
42 #include "../iterator/BoxIterator.h"
43 #include "../iterator/SequenceIterator.h"
67 configDefaultLine(canvas);
68 configDefaultPoint(canvas);
78 const std::vector<te::se::Symbolizer*> symbolizers = rule->
getSymbolizers();
80 for(
size_t t= 0; t < symbolizers.size(); ++t)
101 int vertexGeomPropIdx = checkVertexGeometryProperty(l);
102 int edgeGeomPropIdx = checkEdgeGeometryProperty(l);
118 if(edgeGeomPropIdx != -1)
122 canvas->
draw(geomEdge);
126 canvas->
draw(geomVFrom);
130 canvas->
draw(geomVFrom);
131 canvas->
draw(geomVTo);
138 canvas->
draw(geomVFrom);
157 canvas->
draw(geomVFrom);
158 canvas->
draw(geomVTo);
221 std::size_t size = 12;
233 std::size_t size = 12;
const std::vector< Rule * > & getRules() const
TESEEXPORT Fill * CreateFill(const std::string &color, const std::string &opacity)
Creates a fill.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
virtual void setPointPattern(te::color::RGBAColor **pattern, int ncols, int nrows)=0
It sets the point pattern.
Rule * getRule(std::size_t i) const
This is the base class for layers.
~LayerRenderer()
Destructor.
void setIterator(te::graph::AbstractIterator *i)
Used to associate a iterator to graph.
A canvas is an abstraction of a drawing area.
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
A Symbolizer describes how a feature is to appear on a map.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
void config(const te::se::Symbolizer *symbolizer)
It configs the canvas based on given symbolizer.
A Layer is a reference to a virtual dataset with/without geometric attributes.
int getIdFrom()
It returns the vertex origin identification.
const std::vector< Symbolizer * > & getSymbolizers() const
#define TE_SE_DEFAULT_STROKE_BASIC_WIDTH
It specifies the default width used by stroke basic (solid colors).
TESEEXPORT Mark * CreateMark(const std::string &wellKnownName, Stroke *stroke, Fill *fill)
Creates a mark.
virtual void draw(te::map::AbstractLayer *layer, te::map::Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the layer geographic objects in the given canvas using the informed SRS. ...
It renders the objects associated to a Layer.
int getIdTo()
It returns the vertex destiny identification.
#define TE_TRANSPARENT
For an RGBA color this is the value of the alpha-channel for totally transparent. ...
LineString is a curve with linear interpolation between points.
virtual bool isEdgeIteratorAfterEnd()
Used to check the iterator position.
void configDefaultPoint(te::map::Canvas *canvas)
Configs the canvas with default values for point styles.
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
const double & getX() const
It returns the Point x-coordinate value.
TESEEXPORT Stroke * CreateStroke(const std::string &color, const std::string &width)
Creates a stroke.
A Symbology Enconding visitor that configures a given canvas based on symbolizers elements...
virtual int getVertexPropertySize()=0
Used to verify the number of properties associated to vertex elements.
te::graph::Edge * getNextEdge()
It returns a pointer to the next edge element of a graph.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
int getId()
It returns the vertex id.
A point with x and y coordinate values.
te::graph::Edge * getFirstEdge()
It returns a pointer to the first edge element of a graph.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
virtual void setPointColor(const te::color::RGBAColor &color)=0
It sets the point drawing color.
int checkEdgeGeometryProperty(te::graph::Layer *l)
Verify if the graph layer has a geometry to define the edges elements.
#define TE_SE_DEFAULT_STROKE_BASIC_COLOR
It specifies the default color used by stroke basic (solid colors).
void configDefaultLine(te::map::Canvas *canvas)
Configs the canvas with default values for line styles.
std::vector< te::dt::AbstractData * > & getAttributes()
It returns the vector of attributes associated with this element.
te::graph::AbstractGraph * getGraph() const
It returns the graph associated to the layer.
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
void setPoint(std::size_t i, const double &x, const double &y)
It sets the value of the specified point.
#define TE_OPAQUE
For an RGBA color this is the value of the alpha-channel for totally opaque.
std::vector< te::dt::AbstractData * > & getAttributes()
It returns the vector of attributes associated with this element.
void Free(std::vector< T * > *v)
This function can be applied to a pointer to a vector of pointers.
virtual void setLineCapStyle(LineCapStyle style)=0
It sets the line cap style.
virtual void setLineDashStyle(LineDashStyle style)=0
It sets the line dash style.
virtual void setLineJoinStyle(LineJoinStyle style)=0
It sets the line join style.
virtual void draw(const te::gm::Geometry *geom)=0
It draws the geometry on canvas.
virtual te::graph::Vertex * getVertex(int id)=0
It returns the vertex element if it's exist.
It models a property definition.
virtual void setLineColor(const te::color::RGBAColor &color)=0
It sets the pen color used to draw line geometries.
int getType() const
It returns the property data type.
void configLoopPoint(te::map::Canvas *canvas)
Configs the canvas with default values for point styles.
const double & getY() const
It returns the Point y-coordinate value.
virtual int getEdgePropertySize()=0
Used to verify the number of properties associated to edge elements.
static MarkRendererManager & getInstance()
It returns a reference to the singleton instance.
int checkVertexGeometryProperty(te::graph::Layer *l)
Verify if the graph layer has a geometry to define the vertexs elements.
An Envelope defines a 2D rectangular region.
virtual te::dt::Property * getEdgeProperty(int idx)=0
Get a edge property given a index.
te::graph::AbstractIterator * getIterator()
Used to get a iterator associated to graph.
virtual void setLineWidth(int w)=0
It sets the line width.
virtual te::dt::Property * getVertexProperty(int idx)=0
Get a vertex property given a index.
A Mark specifies a geometric shape and applies coloring to it.