26 #include "../../../../dataaccess/dataset/DataSet.h"
27 #include "../../../../dataaccess/utils/Utils.h"
28 #include "../../../../datatype/Utils.h"
29 #include "../../../../maptools/AbstractLayer.h"
30 #include "../../../../raster/Band.h"
31 #include "../../../../raster/BandProperty.h"
32 #include "../../../../raster/Utils.h"
33 #include "../../propertybrowser/AbstractPropertyManager.h"
45 layerInfo_prop->addSubProperty(id_prop);
46 id_prop->setEnabled(
false);
49 layerInfo_prop->addSubProperty(title_prop);
50 title_prop->setPropertyName(
"title");
51 title_prop->setEnabled(
false);
54 layerInfo_prop->addSubProperty(srid_prop);
55 srid_prop->setPropertyName(
"srid");
56 srid_prop->setEnabled(
false);
66 llx_prop->setEnabled(
false);
67 lly_prop->setEnabled(
false);
68 urx_prop->setEnabled(
false);
69 ury_prop->setEnabled(
false);
71 bbox_prop->addSubProperty(llx_prop);
72 bbox_prop->addSubProperty(lly_prop);
73 bbox_prop->addSubProperty(urx_prop);
74 bbox_prop->addSubProperty(ury_prop);
76 layerInfo_prop->addSubProperty(bbox_prop);
81 visEnum << tr(
"Not visible") << tr(
"visible") << tr(
"Partially visible");
84 layerInfo_prop->addSubProperty(vis_prop);
85 vis_prop->setPropertyName(
"visibility");
86 vis_prop->setEnabled(
false);
98 addProperty(layerInfo_prop, tr(
"Layer properties"), Qt::lightGray);
101 std::auto_ptr<te::da::DataSetType> dsType = layer->
getSchema();
103 if(dsType->hasRaster())
115 if(p->propertyName() ==
"srid")
116 m_layer->setSRID(value);
117 else if(p->propertyName() ==
"visibility")
123 if(p->propertyName() ==
"title")
124 m_layer->setTitle(value.toStdString());
130 std::auto_ptr<te::da::DataSet> dataSet = rasterLayer->
getData();
134 std::auto_ptr<te::rst::Raster> raster = dataSet->getRaster(rpos);
153 rasterInfoProp->addSubProperty(nLinesProp);
154 rasterInfoProp->addSubProperty(nColumnsProp);
155 rasterInfoProp->addSubProperty(nBandsProp);
156 rasterInfoProp->addSubProperty(nResXProp);
157 rasterInfoProp->addSubProperty(nResYProp);
158 rasterInfoProp->addSubProperty(nAccessProp);
159 rasterInfoProp->addSubProperty(nMultiResProp);
162 nLinesProp->setEnabled(
false);
163 nColumnsProp->setEnabled(
false);
164 nBandsProp->setEnabled(
false);
165 nResXProp->setEnabled(
false);
166 nResYProp->setEnabled(
false);
167 nAccessProp->setEnabled(
false);
168 nMultiResProp->setEnabled(
false);
189 for(std::size_t t = 0; t < raster->getNumberOfBands(); ++t)
205 bandProp->addSubProperty(descriptionProp);
206 bandProp->addSubProperty(dataTypeProp);
207 bandProp->addSubProperty(dummyValueProp);
208 bandProp->addSubProperty(colorInterpProp);
209 bandProp->addSubProperty(palleteInterpProp);
212 descriptionProp->setEnabled(
false);
213 dataTypeProp->setEnabled(
false);
214 dummyValueProp->setEnabled(
false);
215 colorInterpProp->setEnabled(
false);
216 palleteInterpProp->setEnabled(
false);
233 blockProp->addSubProperty(nBlockXProp);
234 blockProp->addSubProperty(nBlockYProp);
235 blockProp->addSubProperty(blockWProp);
236 blockProp->addSubProperty(blockHProp);
238 nBlockXProp->setEnabled(
false);
239 nBlockYProp->setEnabled(
false);
240 blockWProp->setEnabled(
false);
241 blockHProp->setEnabled(
false);
248 bandProp->addSubProperty(blockProp);
260 categProp->addSubProperty(cNameProp);
262 cNameProp->setEnabled(
false);
267 bandProp->addSubProperty(categProp);
271 rasterInfoProp->addSubProperty(bandProp);
275 addProperty(rasterInfoProp, tr(
"Raster properties"), Qt::lightGray);
TEDATATYPEEXPORT std::string ConvertDataTypeToString(const int &dataType)
Function used to convert from a int (Data Type Enum) to a string.
virtual const std::string & getId() const
It returns the layer id.
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
std::vector< std::string > m_categoryNames
Set of categoric names for the values contained in a dimension.
virtual const std::string & getTitle() const
It returns the layer title.
int m_nblocksx
The number of blocks in x.
int m_nblocksy
The number of blocks in y.
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
virtual Visibility getVisibility() const
It returns the layer visibility.
double m_noDataValue
Value to indicate elements where there is no data, default is std::numeric_limits::max().
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
TERASTEREXPORT std::string ConvertColorInterpTypeToString(const te::rst::ColorInterp &ci)
Function used to convert from a Color Interp Enum to a string.
static AbstractPropertyManager & getInstance()
It returns a reference to the singleton instance.
BandProperty * getProperty()
Returns the band property.
int m_blkw
Block width (pixels).
virtual std::auto_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.
A raster band description.
TERASTEREXPORT std::string ConvertPalleteInterpTypeToString(const te::rst::PaletteInterpretation &pi)
Function used to convert from a Pallete Interp Enum to a string.
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
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.
std::string m_description
A description.
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
int m_blkh
Block height (pixels).
Visibility
Each layer can have three states of visibility.
ColorInterp m_colorInterp
The color interpretation.
PaletteInterpretation m_paletteInterp
Pallete interpretation.
virtual std::auto_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.