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(
TR_MAP(
"Wrong type render type for this layer!"));
72 else if(rlayer->
getSRID() != srid)
74 throw Exception(
TR_MAP(
"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(
TR_MAP(
"Could not create a default coverage style to the layer %1%.")) % layer->
getTitle()).str());
100 throw Exception(
TR_MAP(
"The layer style is not a Coverage Style!"));
virtual const std::string & getTitle() const
It returns the layer title.
This is the base class for layers.
A layer with reference to a raster.
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. ...
Utility functions for MapTools module.
A canvas is an abstraction of a drawing area.
The CoverageStyle defines the styling that is to be applied to a subset of Coverage data...
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
An exception class for the MapTools module.
TESEEXPORT Style * CreateCoverageStyle(const std::vector< te::rst::BandProperty * > &properties)
Try creates an appropriate coverage style based on given band properties.
~RasterLayerRenderer()
Destructor.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
It renders the objects associated to a raster layer.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
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.
#define TR_MAP(message)
It marks a string in order to get translated. This is a special mark used in the Map Rendering module...
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
te::rst::Raster * getRaster() const
bool intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
A layer with reference to a raster.
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)
An Envelope defines a 2D rectangular region.
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.