26 #include "../../../../core/uri/URI.h" 27 #include "../../../../core/uri/Utils.h" 28 #include "../../../../dataaccess/dataset/DataSet.h" 29 #include "../../../../dataaccess/datasource/DataSourceInfoManager.h" 30 #include "../../../../dataaccess/utils/Utils.h" 31 #include "../../../../datatype/Utils.h" 32 #include "../../../../geometry/GeometryProperty.h" 33 #include "../../../../maptools/AbstractLayer.h" 34 #include "../../../../raster/RasterSummary.h" 35 #include "../../../../raster/RasterSummaryManager.h" 36 #include "../../../../raster/Band.h" 37 #include "../../../../raster/BandProperty.h" 38 #include "../../../../raster/Utils.h" 39 #include "../../../../srs/SpatialReferenceSystemManager.h" 40 #include "../../propertybrowser/AbstractPropertyManager.h" 52 layerInfo_prop->addSubProperty(id_prop);
53 id_prop->setEnabled(
false);
56 layerInfo_prop->addSubProperty(title_prop);
57 title_prop->setPropertyName(
"title");
58 title_prop->setEnabled(
false);
61 layerInfo_prop->addSubProperty(srid_prop);
62 srid_prop->setPropertyName(
"srid");
63 srid_prop->setEnabled(
false);
66 layerInfo_prop->addSubProperty(connection_prop);
67 connection_prop->setPropertyName(
"connection");
68 connection_prop->setEnabled(
false);
71 layerInfo_prop->addSubProperty(numofitens_prop);
72 numofitens_prop->setPropertyName(
"numofitens");
73 numofitens_prop->setEnabled(
false);
83 llx_prop->setEnabled(
false);
84 lly_prop->setEnabled(
false);
85 urx_prop->setEnabled(
false);
86 ury_prop->setEnabled(
false);
88 bbox_prop->addSubProperty(llx_prop);
89 bbox_prop->addSubProperty(lly_prop);
90 bbox_prop->addSubProperty(urx_prop);
91 bbox_prop->addSubProperty(ury_prop);
93 layerInfo_prop->addSubProperty(bbox_prop);
98 visEnum << tr(
"Not visible") << tr(
"visible") << tr(
"Partially visible");
101 layerInfo_prop->addSubProperty(vis_prop);
102 vis_prop->setPropertyName(
"visibility");
103 vis_prop->setEnabled(
false);
106 QString sridStr = QString::number(layer->
getSRID());
107 sridStr += QObject::tr(
" - ");
119 QString connInfo = QObject::tr(
"Scheme: ") + uri.
scheme().c_str();
121 if (!uri.
user().empty())
122 connInfo += QObject::tr(
" User: ") + uri.
user().c_str();
124 if (!uri.
host().empty())
125 connInfo += QObject::tr(
" Host: ") + uri.
host().c_str();
127 if (!uri.
port().empty())
128 connInfo += QObject::tr(
" Port: ") + uri.
port().c_str();
130 if (!uri.
path().empty())
131 connInfo += QObject::tr(
" Path: ") + uri.
path().c_str();
145 addProperty(layerInfo_prop, tr(
"Layer properties"), QColor(255, 255, 175));
148 std::unique_ptr<te::da::DataSetType> dsType = layer->
getSchema();
150 if(dsType->hasRaster())
154 else if (dsType->hasGeom())
175 QtProperty* ,
const QString& )
188 std::unique_ptr<te::da::DataSet> dataSet = rasterLayer->
getData();
190 if(dataSet->isBeforeBegin())
191 dataSet->moveFirst();
195 std::unique_ptr<te::rst::Raster> raster = dataSet->getRaster(rpos);
225 nRasterNameProp->setEnabled(
false);
226 nLinesProp->setEnabled(
false);
227 nColumnsProp->setEnabled(
false);
228 nBandsProp->setEnabled(
false);
229 nResXProp->setEnabled(
false);
230 nResYProp->setEnabled(
false);
231 nAccessProp->setEnabled(
false);
232 nMultiResProp->setEnabled(
false);
253 raster->getName().empty() ? QString() : QString::fromStdString( raster->getName() ) );
272 for(std::size_t t = 0; t < raster->getNumberOfBands(); ++t)
288 bandProp->addSubProperty(descriptionProp);
289 bandProp->addSubProperty(dataTypeProp);
290 bandProp->addSubProperty(dummyValueProp);
291 bandProp->addSubProperty(colorInterpProp);
292 bandProp->addSubProperty(palleteInterpProp);
295 descriptionProp->setEnabled(
false);
296 dataTypeProp->setEnabled(
false);
297 dummyValueProp->setEnabled(
false);
298 colorInterpProp->setEnabled(
false);
299 palleteInterpProp->setEnabled(
false);
316 blockProp->addSubProperty(nBlockXProp);
317 blockProp->addSubProperty(nBlockYProp);
318 blockProp->addSubProperty(blockWProp);
319 blockProp->addSubProperty(blockHProp);
321 nBlockXProp->setEnabled(
false);
322 nBlockYProp->setEnabled(
false);
323 blockWProp->setEnabled(
false);
324 blockHProp->setEnabled(
false);
331 bandProp->addSubProperty(blockProp);
343 categProp->addSubProperty(cNameProp);
345 cNameProp->setEnabled(
false);
350 bandProp->addSubProperty(categProp);
361 QtProperty* metaItemProp =
365 metaProp->addSubProperty(metaItemProp);
367 metaItemProp->setEnabled(
false);
370 metaItemProp, QString::fromStdString(
374 bandProp->addSubProperty(metaProp);
387 std::unique_ptr<te::da::DataSetType> dsType = vecLayer->
getSchema();
396 vecInfoProp->addSubProperty(titleProp);
399 titleProp->setEnabled(
false);
405 std::vector<te::dt::Property*> vecProps = dsType->getProperties();
407 for (std::size_t t = 0; t < vecProps.size(); ++t)
420 propProperty->addSubProperty(nameProp);
421 propProperty->addSubProperty(dataTypeProp);
424 nameProp->setEnabled(
false);
425 dataTypeProp->setEnabled(
false);
432 vecInfoProp->addSubProperty(propProperty);
446 pkProperty->addSubProperty(nameProp);
449 nameProp->setEnabled(
false);
455 std::vector<te::dt::Property*> vecProps = pk->
getProperties();
457 for (std::size_t t = 0; t < vecProps.size(); ++t)
470 propProperty->addSubProperty(nameProp);
471 propProperty->addSubProperty(dataTypeProp);
474 nameProp->setEnabled(
false);
475 dataTypeProp->setEnabled(
false);
482 pkProperty->addSubProperty(propProperty);
486 vecInfoProp->addSubProperty(pkProperty);
501 geomProperty->addSubProperty(nameProp);
502 geomProperty->addSubProperty(geomTypeProp);
503 geomProperty->addSubProperty(sridProp);
506 nameProp->setEnabled(
false);
507 geomTypeProp->setEnabled(
false);
508 sridProp->setEnabled(
false);
514 QString sridStr = QString::number(geomProp->
getSRID());
515 sridStr += QObject::tr(
" - ");
520 vecInfoProp->addSubProperty(geomProperty);
524 addProperty(vecInfoProp, tr(
"Data properties"), QColor(255, 255, 175));
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
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.
std::string path() const
Retrieving the path.
std::string scheme() const
Retrieving the scheme.
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
boost::shared_ptr< DataSource > DataSourcePtr
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<double>::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.
It models a property definition.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the primary key.
int getSRID() const
It returns the spatial reference system identifier associated to this property.
std::vector< std::pair< std::string, std::string > > m_metadata
A list of metadata where each element consists of a (key, value).
static AbstractPropertyManager & getInstance()
It returns a reference to the singleton instance.
BandProperty * getProperty()
Returns the band property.
virtual std::unique_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.
int m_blkw
Block width (pixels).
GeomType getGeometryType() const
It returns the geometry subtype allowed for the property.
std::string port() const
Retrieving the port.
std::string host() const
Retrieving the host.
A raster band description.
A class for representing an Uniform Resource Identifier (URI).
int getType() const
It returns the property data type.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
const std::string & getDataSetName() const
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.
It describes a primary key (pk) constraint.
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).
static std::string getGeomTypeString(const int &gId)
It returns the TerraLib geometry type string given a type id.
virtual const std::string & getName() const
It returns the constraint name.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
ColorInterp m_colorInterp
The color interpretation.
virtual const std::string & getDataSourceId() const
std::string user() const
Retrieving the user information.
PaletteInterpretation m_paletteInterp
Pallete interpretation.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
const std::string & getName() const
It returns the property name.