27 #include "../common/Translator.h"
28 #include "../geometry/Envelope.h"
29 #include "../raster/Raster.h"
30 #include "../se/CoverageStyle.h"
31 #include "../se/Utils.h"
32 #include "../srs/Config.h"
39 #include <boost/format.hpp>
40 #include <boost/lexical_cast.hpp>
63 throw Exception(
TE_TR(
"Wrong type render type for this layer!"));
72 else if(rlayer->
getSRID() != srid)
74 throw Exception(
TE_TR(
"The layer or map don't have a valid SRID!"));
82 std::auto_ptr<te::rst::Raster> raster(rlayer->
getRaster());
92 throw Exception((boost::format(
TE_TR(
"Could not create a default coverage style to the layer %1%.")) % layer->
getTitle()).str());
100 throw Exception(
TE_TR(
"The layer style is not a Coverage Style!"));
A layer with reference to a raster.
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...
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
virtual const std::string & getTitle() const
It returns the layer title.
The CoverageStyle defines the styling that is to be applied to a subset of Coverage data...
TESEEXPORT Style * CreateCoverageStyle(const std::vector< te::rst::BandProperty * > &properties)
Try creates an appropriate coverage style based on given band properties.
te::rst::Raster * getRaster() const
#define TE_TR(message)
It marks a string in order to get translated.
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 layer with reference to a raster.
An Envelope defines a 2D rectangular region.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
~RasterLayerRenderer()
Destructor.
It renders the objects associated to a raster layer.
A canvas is an abstraction of a drawing area.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
Envelope intersection(const Envelope &rhs) const
It returns an envelope that represents the point set intersection with another envelope.
void transform(int oldsrid, int newsrid)
It will transform the coordinates of the Envelope from the old SRS to the new one.
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)