26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_UTILS_H 27 #define __TERRALIB_DATAACCESS_INTERNAL_UTILS_H 30 #include "../../geometry/Enums.h" 31 #include "../../srs/Config.h" 32 #include "../datasource/DataSource.h" 33 #include "../query/Expression.h" 34 #include "../query/Fields.h" 35 #include "../query/Select.h" 38 #include <boost/ptr_container/ptr_vector.hpp> 48 namespace core {
class URI; }
49 namespace dt {
class Property; }
54 class GeometryProperty;
57 namespace rst {
class RasterProperty; }
65 class DataSetTypeConverter;
66 class DataSourceCatalogLoader;
67 class DataSourceTransactor;
83 const std::string& propertyName,
84 const std::string& datasourceId);
226 std::vector<std::string>& pnames,
227 std::vector<int>& ptypes);
230 std::vector<std::string>& pnames,
231 std::vector<int>& ptypes);
280 const std::map<std::string, std::string>& options,
281 std::size_t limit = 0);
302 const std::string& propertyName);
305 const std::vector<std::string>& properties);
308 const std::vector<std::string>& properties,
309 const std::string& geometryProperty,
315 const std::vector<std::string>& properties,
316 const std::string& geometryProperty,
321 const std::vector<std::string>& properties,
322 const ObjectIdSet* oids);
399 #endif // __TERRALIB_DATAACCESS_INTERNAL_UTILS_H TEDATAACCESSEXPORT void GetOIDPropertyNames(const DataSetType *type, std::vector< std::string > &pnames)
TEDATAACCESSEXPORT std::unique_ptr< Fields > BuildFields(const std::vector< std::string > &properties)
TEDATAACCESSEXPORT void GetPropertyInfo(const DataSetType *const dt, std::vector< std::string > &pnames, std::vector< int > &ptypes)
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
boost::shared_ptr< DataSource > DataSourcePtr
TEDATAACCESSEXPORT void GetEmptyOIDSet(const DataSetType *type, ObjectIdSet *&set)
Returns an empty ObjectIdSet, with the definitions of fields that compose it.
A class that models the description of a dataset.
TEDATAACCESSEXPORT void LoadProperties(te::da::DataSetType *dataset, const std::string &datasourceId)
TEDATAACCESSEXPORT std::unique_ptr< Select > BuildSelect(const std::string &dsname)
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > HideColumns(te::da::DataSet *ds, te::da::DataSetType *dst, const std::vector< std::string > &columns)
It hide columns of a DataSet using DataSetAdapter.
TEDATAACCESSEXPORT std::string GetDataSetCategoryName(int category)
TEDATAACCESSEXPORT std::string GetSQLValueNames(const DataSetType *dt)
TEDATAACCESSEXPORT DataSet * GetDataSet(const std::string &name, const std::string &datasourceId)
SpatialRelation
Spatial relations between geometric objects.
TEDATAACCESSEXPORT std::vector< int > GetPropertyDataTypes(const te::da::DataSet *dataset)
TEDATAACCESSEXPORT double GetValueAsDouble(const te::da::DataSet *ds, const size_t pos)
It gets the value as double.
TEDATAACCESSEXPORT int GetPropertyIndex(te::da::DataSet *dataSet, const std::string propName)
TEDATAACCESSEXPORT te::rst::RasterProperty * GetFirstRasterProperty(const DataSetType *dt)
It models a property definition.
TEDATAACCESSEXPORT bool HasLinkedTable(te::da::DataSetType *type)
It checks if the datasettype has a linked table.
TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet *dataset, const std::string &name)
An Envelope defines a 2D rectangular region.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
This class represents an unique id for a data set element.
TEDATAACCESSEXPORT bool IsValidName(const std::string &name, std::string &invalidChar)
It checks if the name is not valid as the existence of invalid characters, reserved words...
TEDATAACCESSEXPORT void GetOIDDatasetProps(const DataSetType *type, std::pair< std::string, int > &dsProps)
TEDATAACCESSEXPORT double Round(const double &value, const size_t &precision)
It gets the round value.
TEDATAACCESSEXPORT te::gm::Envelope * GetExtent(const std::string &datasetName, const std::string &propertyName, const std::string &datasourceId)
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
TEDATAACCESSEXPORT ObjectId * GenerateOID(DataSet *dataset, const std::vector< std::string > &names)
TEDATAACCESSEXPORT void Create(DataSource *ds, DataSetType *dt, DataSet *d, std::size_t limit=0)
It creates the dataset definition in a data source and then fill it with data from the input dataset...
TEDATAACCESSEXPORT void GetOIDPropertyPos(const DataSetType *type, std::vector< std::size_t > &ppos)
TEDATAACCESSEXPORT void AssociateDataSetTypeConverterSRID(DataSetTypeConverter *converter, const int &inputSRID, const int &outputSRID=TE_UNKNOWN_SRS)
TEDATAACCESSEXPORT ObjectIdSet * GenerateOIDSet(DataSet *dataset, const DataSetType *type)
A dataset is the unit of information manipulated by the data access module of TerraLib.
TEDATAACCESSEXPORT te::dt::Property * GetFirstSpatialProperty(const DataSetType *dt)
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
TEDATAACCESSEXPORT std::unique_ptr< Expression > BuildSpatialOp(Expression *e1, Expression *e2, te::gm::SpatialRelation r)
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
TEDATAACCESSEXPORT std::size_t GetFirstSpatialPropertyPos(const te::da::DataSet *dataset)
It returns the first dataset spatial property or NULL if none is found.
TEDATAACCESSEXPORT std::string getBasePkey(te::da::ObjectId *oid, std::pair< std::string, int > &dsProps)
TEDATAACCESSEXPORT bool HasDataSet(const std::string &datasourceId)
TEDATAACCESSEXPORT void GetDataSetNames(std::vector< std::string > &datasetNames, const std::string &datasourceId)
TEDATAACCESSEXPORT double GetSummarizedValue(std::vector< double > &values, const std::string &summary)
It gets the summarized value.
TEDATAACCESSEXPORT DataSetAdapter * CreateAdapter(DataSet *ds, DataSetTypeConverter *converter, bool isOwner=false)
TEDATAACCESSEXPORT void LoadFull(te::da::DataSetType *dataset, const std::string &datasourceId)