27 #include "../common/progress/TaskProgress.h" 28 #include "../core/translator/Translator.h" 29 #include "../common/STLUtils.h" 30 #include "../common/StringUtils.h" 31 #include "../dataaccess/dataset/DataSetType.h" 32 #include "../dataaccess/query/And.h" 33 #include "../dataaccess/query/DataSetName.h" 34 #include "../dataaccess/query/Field.h" 35 #include "../dataaccess/query/LiteralEnvelope.h" 36 #include "../dataaccess/query/PropertyName.h" 37 #include "../dataaccess/query/Select.h" 38 #include "../dataaccess/query/ST_Intersects.h" 39 #include "../dataaccess/query/Where.h" 40 #include "../dataaccess/utils/Utils.h" 41 #include "../fe/Literal.h" 42 #include "../geometry/GeometryProperty.h" 43 #include "../geometry/Utils.h" 44 #include "../memory/DataSet.h" 45 #include "../raster/Grid.h" 46 #include "../raster/Raster.h" 47 #include "../raster/RasterFactory.h" 48 #include "../raster/RasterProperty.h" 49 #include "../raster/RasterSummary.h" 50 #include "../raster/RasterSummaryManager.h" 51 #include "../raster/Utils.h" 52 #include "../se/ChannelSelection.h" 53 #include "../se/CoverageStyle.h" 54 #include "../se/FeatureTypeStyle.h" 55 #include "../se/ImageOutline.h" 56 #include "../se/RasterSymbolizer.h" 57 #include "../se/Rule.h" 58 #include "../se/Utils.h" 59 #include "../srs/Config.h" 60 #include "../srs/Converter.h" 61 #include "../srs/SpatialReferenceSystemManager.h" 76 #include <boost/format.hpp> 77 #include <boost/lexical_cast.hpp> 78 #include <boost/uuid/random_generator.hpp> 79 #include <boost/uuid/uuid_io.hpp> 87 #define TeCDR 0.01745329251994329576 91 #define TeCRD 57.29577951308232087679 96 std::list<te::map::AbstractLayerPtr>::const_iterator it = layers.begin();
100 while(it != layers.end())
102 if(it == layers.begin())
122 if(!layer->hasChildren())
124 std::unique_ptr<te::da::DataSetType>
dt(layer->getSchema());
131 std::unique_ptr<te::da::DataSet>
ds(layer->getData(objSet));
135 while(
ds->moveNext())
137 if (
ds->isNull(geomProp->getName()))
140 std::unique_ptr<te::gm::Geometry> geom =
ds->getGeometry(geomProp->getName());
144 if(layer->getSRID() != srid)
145 auxEnv.
transform(layer->getSRID(), srid);
154 finalEnv.
Union(auxEnv);
159 for(std::size_t i = 0; i < layer->getChildrenCount(); ++i)
175 std::vector<std::string> values;
177 for(std::size_t i = 0; i < values.size(); ++i)
178 style.push_back(atof(values[i].c_str()));
190 throw Exception(
TE_TR(
"The data set name referenced by the layer is empty!"));
196 std::unique_ptr<te::da::DataSetType> dstype(ds->getDataSetType(dsname));
198 if(dstype.get() ==
nullptr)
202 std::unique_ptr<te::rst::RasterProperty> rasterProperty(dynamic_cast<te::rst::RasterProperty*>(dstype->getProperties()[0]->clone()));
204 if(rasterProperty.get() ==
nullptr)
207 return rasterProperty.release();
215 std::unique_ptr<te::da::DataSet> dataset(layer->
getData());
217 if (dataset.get() ==
nullptr)
218 throw Exception(
TE_TR(
"Could not get the data set reference by the layer!"));
223 dataset->moveFirst();
225 std::unique_ptr<te::da::DataSetType> dsType = layer->
getSchema();
226 std::unique_ptr<te::rst::Raster> raster = dataset->getRaster(rpos);
228 if (raster.get() ==
nullptr)
229 throw Exception(
TE_TR(
"Could not get the raster referenced by the layer!"));
234 if (style ==
nullptr || style->
getRules().empty())
242 throw Exception(
TE_TR(
"Could not get the raster style referenced by the layer!"));
250 const std::vector<te::se::Symbolizer*>& symbolizers = rule->
getSymbolizers();
252 if (symbolizers.empty())
253 throw Exception(
TE_TR(
"Could not get the symbolizers referenced by the rule!"));
258 if (rasterSymbolizer ==
nullptr)
259 throw Exception(
TE_TR(
"Could not get the raster symbolizers referenced by the style!"));
265 for (std::size_t t = 0; t < raster->getNumberOfBands(); ++t)
273 raster->getGrid()->setSRID(layer->
getSRID());
275 return raster.release();
286 visibleLayers.push_back(layer);
288 for(std::size_t i = 0; i < layer->getChildrenCount(); ++i)
298 for(std::list<te::map::AbstractLayerPtr>::const_iterator it = layers.begin(); it != layers.end(); ++it)
306 for(std::list<te::map::AbstractLayerPtr>::const_iterator it = layers.begin(); it != layers.end(); ++it)
322 for(std::size_t i = 0; i < layer->getChildrenCount(); ++i)
351 const std::string& datasetName = type->
getName();
352 assert(!datasetName.empty());
361 std::size_t nRules = style->
getRules().size();
363 for(std::size_t i = 0; i < nRules; ++i)
375 std::unique_ptr<te::da::DataSet> dataset;
379 dataset = ds->getDataSet(datasetName, geometryProperty->getName(), &bbox,
te::gm::INTERSECTS);
389 throw Exception(
TE_TR(
"Could not convert the OGC Filter expression to TerraLib expression!"));
402 wh->
setExp(finalRestriction);
417 dataset = ds->query(select);
420 if(dataset.get() ==
nullptr)
421 throw Exception((boost::format(
TE_TR(
"Could not retrieve the data set %1%.")) % datasetName).str());
423 if(dataset->moveNext() ==
false)
427 const std::vector<te::se::Symbolizer*>& symbolizers = rule->
getSymbolizers();
428 std::size_t nSymbolizers = symbolizers.size();
431 std::string message =
TE_TR(
"Drawing the dataset");
432 message +=
" " + datasetName +
". ";
433 message +=
TE_TR(
"Rule");
434 message +=
" " + boost::lexical_cast<std::string>(i + 1) +
" " +
TE_TR(
"of") +
" ";
435 message += boost::lexical_cast<std::string>(nRules) +
".";
441 for(std::size_t j = 0; j < nSymbolizers; ++j)
453 DrawGeometries(dataset.get(), gpos, canvas, bboxSRID, srid, &task);
456 dataset->moveFirst();
469 bool needRemap =
false;
484 std::unique_ptr<te::gm::Geometry> geom;
488 if(geom.get() ==
nullptr)
491 catch(std::exception& )
499 geom->setSRID(fromSRID);
500 geom->transform(toSRID);
503 canvas->
draw(geom.get());
518 const std::string& datasetName = type->
getName();
519 assert(!datasetName.empty());
525 std::unique_ptr<te::da::DataSet> dataset(ds->getDataSet(datasetName, rasterProperty->getName(), &bbox,
te::gm::INTERSECTS));
526 if(dataset.get() ==
nullptr)
527 throw Exception((boost::format(
TE_TR(
"Could not retrieve the data set %1%.")) % datasetName).str());
531 std::unique_ptr<te::rst::Raster> raster(dataset->getRaster(rpos));
532 if(dataset.get() ==
nullptr)
533 throw Exception((boost::format(
TE_TR(
"Could not retrieve the raster from the data set %1%.")) % datasetName).str());
535 DrawRaster(raster.get(), canvas, bbox, bboxSRID, visibleArea, srid, style, rc, scale, cancel);
551 std::unique_ptr<te::rst::Grid> gridCanvas(
new te::rst::Grid(static_cast<unsigned int>(canvas->
getWidth()), static_cast<unsigned int>(canvas->
getHeight()), gmbr, srid));
555 visibleAreaRasterProj->transform(srid, bboxSRID);
557 double resx = visibleAreaRasterProj->getWidth() /
static_cast<double>(canvas->
getWidth());
558 double resy = visibleAreaRasterProj->getHeight() /
static_cast<double>(canvas->
getHeight());
563 double factor = std::min(rx, ry);
564 factor = std::max(factor, 1.0);
566 std::size_t level =
static_cast<std::size_t
>(std::log(factor) / std::log(2.0));
570 bool needDelete =
false;
572 if(level != 0 && numberOfLevels != 0)
574 if(numberOfLevels >= level)
577 overview = raster->
getMultiResLevel(static_cast<unsigned int>(numberOfLevels - 1));
609 const std::complex<double>* cmin = rsMin->at(
b).m_minVal;
610 const std::complex<double>* cmax = rsMax->at(
b).m_maxVal;
611 double min = cmin->real();
612 double max = cmax->real();
622 const std::vector<te::se::Symbolizer*>& symbolizers = rule->
getSymbolizers();
623 assert(!symbolizers.empty());
627 assert(rasterSymbolizer);
637 std::vector<double> gain;
638 std::vector<double> offset1;
639 std::vector<double> offset2;
640 std::vector<double> min;
641 std::vector<double> max;
642 rc->
getValues(gain, offset1, offset2, min, max);
644 rasterTransform.
setContrastType(static_cast<te::map::RasterTransform::ContrastType>(type));
649 bool needRemap =
false;
654 std::string message =
TE_TR(
"Drawing raster");
655 const std::string& rasterName = raster->
getName();
656 !rasterName.empty() ? message +=
" " + raster->
getName() +
". " : message +=
".";
674 converter->setSourceSRID(srid);
675 converter->setTargetSRID(bboxSRID);
679 for(
unsigned int r = 0; r < gridCanvas->getNumberOfRows(); ++r)
681 for(
unsigned int c = 0; c < gridCanvas->getNumberOfColumns(); ++c)
686 converter->convert(inputGeo.
x, inputGeo.
y, inputGeo.
x, inputGeo.
y);
698 color = rasterTransform.
apply(x, y);
720 if (cancel !=
nullptr && (*cancel))
739 if(rasterSymbolizer->getImageOutline() ==
nullptr)
743 te::se::Symbolizer* outlineSymbolizer = rasterSymbolizer->getImageOutline()->getSymbolizer();
744 if(outlineSymbolizer ==
nullptr)
749 cc.
config(outlineSymbolizer);
755 geom->setSRID(bboxSRID);
756 geom->transform(srid);
759 canvas->
draw(geom.get());
765 std::vector<te::rst::BandProperty*> bprops;
773 bprops.push_back(bp);
784 bool needRemap =
false;
793 converter->setSourceSRID(srid);
794 converter->setTargetSRID(bboxSRID);
805 converter->convert(inputGeo.
x, inputGeo.
y, inputGeo.
x, inputGeo.
y);
816 std::vector<double> values;
817 raster->
getValues(static_cast<unsigned int>(x), static_cast<unsigned int>(y), values);
830 std::unique_ptr<te::map::LayerSchema> schema(layer->getSchema());
833 assert(geometryProperty);
852 std::unique_ptr<te::da::DataSet> dataset(layer->getData());
853 assert(dataset.get());
859 std::unique_ptr<te::gm::Geometry> g(dataset->getGeometry(gpos));
862 return g->getGeomTypeId();
870 std::string authName =
"EPSG";
875 return worldBoxPlanar;
877 std::string unitPtrStr = unitPtr->getName();
880 if(unitPtrStr.compare(
"DEGREE") == 0)
889 worldBoxPlanar.
transform(srid, static_cast<int>(projPlanar.second));
892 return worldBoxPlanar;
898 int meridiano =
static_cast<int>(longitude / 6);
899 meridiano = meridiano * 6;
901 meridiano = abs(meridiano) + 3;
903 double long0 = -meridiano *
TeCDR;
906 int zone = (
static_cast<int>((long0*
TeCRD+183.0)/6.0));
929 std::stringstream szone;
932 std::string proj4 =
"+proj=utm";
933 proj4+=
" +zone="+ szone.str();
935 proj4+=
" +ellps=aust_SA";
936 proj4+=
" +towgs84=-57,1,-41,0,0,0,0";
938 proj4+=
" +no_defs ";
945 boost::uuids::basic_random_generator<boost::mt19937> gen;
946 boost::uuids::uuid u = gen();
947 std::string
id = boost::uuids::to_string(u);
virtual std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
unsigned int getNumberOfRows() const
Returns the grid number of rows.
virtual void setValues(unsigned int c, unsigned int r, const std::vector< double > &values)
Sets the imaginary attribute values in all complex bands of a cell.
te::gm::Envelope * getExtent()
Returns the geographic extension of the raster data.
TEDATAACCESSEXPORT te::rst::RasterProperty * GetFirstRasterProperty(const DataSetType *dt)
virtual void setDataSourceId(const std::string &id)
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
An abstract class that models a source of data in a query.
The Field class can be used to model an expression that takes part of the output items of a SELECT...
TEMAPEXPORT void CopyAbstractLayerInfo(const te::map::AbstractLayer *refLayer, te::map::AbstractLayer *layer)
Make a copy of refLayer abstract attributes to layer. Creating new id.
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
Spatial intersects operator.
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
A class that models the name of a dataset used in a From clause.
boost::shared_ptr< DataSource > DataSourcePtr
virtual unsigned int getMultiResLevelsCount() const =0
Returns the current number of multi-resolution pyramid levels.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
virtual Style * clone() const =0
It creates a new copy of this object.
virtual const std::string & getTitle() const
It returns the layer title.
bool hasGeom() const
It returns true if the DataSetType has at least one geometry property; otherwise, it returns false...
A raster band description.
TEMAPEXPORT std::string GetUTMProj4FromZone(int zone)
Returns proj4 string with UTM projection in the specified zone (Only working for south).
virtual te::se::Style * getSelectionStyle() const
It returns the selection Style associated to the layer.
virtual void setRasterContrast(te::map::RasterContrast *contrast)
It sets the raster contrast associated to the Layer.
TEMAPEXPORT te::gm::Envelope GetExtent(const std::list< te::map::AbstractLayerPtr > &layers, int srid, bool onlyVisibles)
It calculates the extent of the given layers in the given SRID.
A class that models the name of any property of an object.
Base exception class for plugin module.
A class that models the description of a dataset.
unsigned int getNumberOfColumns() const
Returns the raster number of columns.
A Symbolizer describes how a feature is to appear on a map.
void setDataSetName(const std::string &name)
const double & getMinScaleDenominator() const
A visitor that converts a OGC Filter Expression to TerraLib Expression.
The CoverageStyle defines the styling that is to be applied to a subset of Coverage data...
void setCompositionMode(te::map::CompositionMode mode)
It sets the composition mode.
virtual void getValues(unsigned int c, unsigned int r, std::vector< double > &values) const
Returns the imaginary attribute values in all complex bands of a cell.
TESEEXPORT Style * CreateCoverageStyle(const std::vector< te::rst::BandProperty * > &properties)
Try creates an appropriate coverage style based on given band properties.
virtual void setGrouping(te::map::Grouping *grouping)
It sets the Grouping associated to the Layer.
This class can be used to inform the progress of a task.
TEMAPEXPORT te::gm::GeomType GetGeomType(const te::map::AbstractLayerPtr &layer)
It gets the geometry type of the given layer.
std::string Convert2UCase(const std::string &value)
It converts a string to upper case.
te::da::Expression * getExpression(const te::fe::Filter *f)
It converts the OGC Filter Expression to a TerraLib Expression.
TESEEXPORT double GetDouble(const te::se::ParameterValue *param)
It gets the parameter value as a double.
virtual Visibility getVisibility() const
It returns the layer visibility.
An utility struct for representing 2D coordinates.
static te::dt::Date ds(2010, 01, 01)
const te::map::RasterTransform::ContrastType getType() const
It gets the contrast type.
A layer with reference to a dataset.
double m_noDataValue
Value to indicate elements where there is no data, default is std::numeric_limits<double>::max().
const te::fe::Filter * getFilter() const
#define TE_TR(message)
It marks a string in order to get translated.
TEMAPEXPORT void DrawGeometries(te::da::DataSetType *type, te::da::DataSourcePtr ds, Canvas *canvas, const te::gm::Envelope &bbox, int bboxSRID, int srid, te::se::FeatureTypeStyle *style)
It draws the data set geometries in the given canvas using the informed SRID and style.
virtual void setTitle(const std::string &title)
It sets the layer title.
bool isActive() const
Verify if the task is active.
Boolean logic operator: AND.
void Union(const Envelope &rhs)
It updates the envelop with coordinates of another envelope.
void geoToGrid(const double &x, const double &y, double &col, double &row) const
Get the grid point associated to a spatial location.
This is an abstract class that models a query expression.
virtual te::map::Chart * getChart() const
It returns the Chart associated to the Layer.
te::core::EncodingType getEncoding() const
It returns the encoding type.
te::map::CompositionMode getCompositionMode() const
It returns the composition mode.
Rule * getRule(std::size_t i) const
virtual void setGeomPropertytName(const std::string &name)
const std::vector< Rule * > & getRules() const
TEMAPEXPORT te::gm::Envelope GetSelectedExtent(const std::list< te::map::AbstractLayerPtr > layers, int srid, bool onlyVisibles)
It calculates the extent of selected objects of the given layers in the given SRID.
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
TEMAPEXPORT te::da::DataSet * DataSet2Memory(te::da::DataSet *dataset)
It creates a new In-Memory dataset with the items from the given dataset.
This class contains the parameters needed for grouping the values of a Property.
Coord2D getCenter() const
It returns the rectangle's center coordinate.
void Tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
It tokenizes a given string with a delimiter of your own choice.
void Free(std::vector< T * > *v)
This function can be applied to a pointer to a vector of pointers.
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, te::map::RasterContrast *rc, const double &scale, bool *cancel)
TEMAPEXPORT void GetDashStyle(const std::string &dasharray, std::vector< double > &style)
Converts a dasharray pattern coded by a string to a vector of double.
virtual void setChart(te::map::Chart *chart)
It sets the Chart associated to the Layer.
This class represents the informations needed to build map charts.
static RasterSummaryManager & getInstance()
It returns a reference to the singleton instance.
An Envelope defines a 2D rectangular region.
The FeatureTypeStyle defines the styling that is to be applied to a dataset that can be viewed as a f...
This class represents a set of unique ids created in the same context. i.e. from the same data set...
An abstract class for raster data strucutures.
unsigned int getNumberOfRows() const
Returns the raster number of rows.
virtual std::size_t getNumberOfBands() const =0
Returns the number of bands (dimension of cells attribute values) in the raster.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
bool hasRaster() const
It returns true if the DataSetType has at least one raster property; otherwise, it returns false...
BandProperty * getProperty()
Returns the band property.
virtual std::unique_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.
TERASTEREXPORT int Round(double val)
Round a double value to a integer value.
static te::dt::TimeDuration dt(20, 30, 50, 11)
virtual int getHeight() const =0
It returns the canvas height.
virtual void setVisibility(Visibility v)
It sets the layer visibility.
virtual int getBandDataType(std::size_t i) const =0
Returns the data type in a particular band (or dimension).
unsigned int getNumberOfColumns() const
Returns the grid number of columns.
double getResolutionX() const
Returns the raster horizontal (x-axis) resolution.
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
A visitor that converts a OGC Filter Expression to TerraLib Expression.
boost::ptr_vector< BandSummary > RasterSummary
RasterSummary is just a typedef of a boost::ptr_vector.
A class that can be used to model a filter expression that can be applied to a query.
void setExp(Expression *exp)
Sets the expression.
void pulse()
Calls setCurrentStep() function using getCurrentStep() + 1.
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
virtual void drawImage(char *src, std::size_t size, ImageType t)=0
It draws the src image over the canvas.
virtual void setExtent(const te::gm::Envelope &mbr)
It sets the Layer extent (or minimum bounding box).
TEMAPEXPORT te::rst::RasterProperty * GetRasterProperty(AbstractLayer *layer)
It gets the raster property referenced by the given data set layer.
A raster band description.
std::unique_ptr< te::gm::Envelope > GetExtent(te::da::DataSet *dset, te::qt::widgets::Promoter *p, const int &rowPosition)
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band.
A filter is any valid predicate expression.
virtual Raster * getMultiResLevel(const unsigned int level) const =0
Returns the required level of a multi-resolution pyramid or NULL if that level does not exists...
This class represents the informations needed to build map charts.
Grid * getGrid()
It returns the raster grid.
virtual void setSelectionStyle(te::se::Style *style)
It sets the selection Style associated to the layer.
Utility functions for the data access module.
void setEncoding(te::core::EncodingType et)
It set the encoding type.
A Select models a query to be used when retrieving data from a DataSource.
const std::vector< Symbolizer * > & getSymbolizers() const
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
A Converter is responsible for the conversion of coordinates between different Coordinate Systems (CS...
virtual te::map::RasterContrast * getRasterContrast() const
It returns the raster contrast associated to the Layer.
This class contains the parameters needed to apply dynamic contrast over a raster.
TEMAPEXPORT te::rst::Raster * GetRaster(AbstractLayer *layer)
It gets the raster referenced by the given data set layer.
A dataset is the unit of information manipulated by the data access module of TerraLib.
A canvas is an abstraction of a drawing area.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
int getSRID() const
Returns the raster spatial reference system identifier.
const std::string & getName() const
Returns the raster name.
This class contains the parameters needed to apply dynamic contrast over a raster.
const std::string & getDataSetName() const
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
virtual std::unique_ptr< te::da::DataSet > getData(te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
It gets the dataset identified by the layer name.
virtual void setSRID(int srid)
It sets the Spatial Reference System ID associated to the Layer.
virtual te::map::Grouping * getGrouping() const
It returns the Grouping associated to the Layer.
static Raster * make()
It creates and returns an empty raster with default raster driver.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
TEMAPEXPORT te::rst::Raster * GetExtentRaster(te::rst::Raster *raster, int w, int h, const te::gm::Envelope &bbox, int bboxSRID, const te::gm::Envelope &visibleArea, int srid)
A class that models a literal for Envelope values.
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
double getResolutionY() const
Returns the raster vertical (y-axis) resolution.
TEMAPEXPORT int CalculatePlanarZone(te::gm::Envelope latLongBox)
Calculates the UTM zone from a Geographic envelope.
virtual const std::string & getGeomPropertyName() const
const double & getMaxScaleDenominator() const
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
int getType() const
It returns the data type of the elements in the band.
This class contains the parameters needed for grouping the values of a Property.
void setSRID(int srid)
Just sets the grid spatial reference system identifier.
std::vector< te::rst::BandProperty * > & getBandProperties()
Returns a reference to the list of bands definitions.
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
void getValues(std::vector< double > &gain, std::vector< double > &offset1, std::vector< double > &offset2, std::vector< double > &min, std::vector< double > &max)
It get the contrast transformation values.
Visibility
Each layer can have three states of visibility.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
A rectified grid is the spatial support for raster data.
ParameterValue * getNoDataValue() const
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
void transform(int oldsrid, int newsrid)
It will transform the coordinates of the Envelope from the old SRS to the new one.
virtual void draw(const te::gm::Geometry *geom)=0
It draws the geometry on canvas.
virtual void setId(const std::string &id)
It sets the layer id.
virtual const std::string & getDataSourceId() const
bool isValid() const
It tells if the rectangle is valid or not.
virtual int getWidth() const =0
It returns the canvas width.
TEGEOMEXPORT Geometry * GetGeomFromEnvelope(const Envelope *const e, int srid)
It creates a Geometry (a polygon) from the given envelope.
TEMAPEXPORT te::gm::Envelope GetWorldBoxInPlanar(const te::gm::Envelope &worldBox, int srid)
It gets the requested envelope on a UTM planar projection.
TEMAPEXPORT void GetVisibleLayers(const std::list< te::map::AbstractLayerPtr > &layers, std::list< te::map::AbstractLayerPtr > &visibleLayers)
It gets the visible layers of the given layer list.
const std::string & getName() const
It returns the property name.