Loading...
Searching...
No Matches
Utils.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralib/dataaccess/utils/Utils.h
22
23 \brief Utility functions for the data access module.
24*/
25
26#ifndef __TERRALIB_DATAACCESS_INTERNAL_UTILS_H
27#define __TERRALIB_DATAACCESS_INTERNAL_UTILS_H
28
29// TerraLib
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"
36
37// Boost
38#include <boost/ptr_container/ptr_vector.hpp>
39
40// STL
41#include <memory>
42#include <string>
43#include <vector>
44
45namespace te
46{
47// Forward declaration
48 namespace core { class URI; }
49 namespace dt { class AbstracData; class Property; }
50 namespace gm
51 {
52 class Envelope;
53 class Geometry;
54 class GeometryProperty;
55 }
56
57 namespace rst { class RasterProperty; }
58
59 namespace da
60 {
61// Forward declaration
62 class DataAccess;
63 class DataSet;
64 class DataSetAdapter;
65 class DataSetType;
66 class DataSetTypeConverter;
67 class DataSourceCapabilities;
68 class DataSourceCatalogLoader;
69 class DataSourceTransactor;
70 class FieldNameValidator;
71 class ObjectId;
72 class ObjectIdSet;
73
74 TEDATAACCESSEXPORT void LoadFull(te::da::DataSetType* dataset, const std::string& datasourceId);
75
76// TEDATAACCESSEXPORT void LoadFull(te::da::DataSetType* dataset, te::da::DataSource* datasource);
77
78 TEDATAACCESSEXPORT void LoadProperties(te::da::DataSetType* dataset, const std::string& datasourceId);
79
80 /*!
81 \return The data extent considering the informed property. The caller will take the ownership of the returned box.
82
83 \exception Exception It throws an exception if the extent can not be determined.
84 */
85 TEDATAACCESSEXPORT te::gm::Envelope* GetExtent(const std::string& datasetName,
86 const std::string& propertyName,
87 const std::string& datasourceId);
88
89 TEDATAACCESSEXPORT void GetDataSetNames(std::vector<std::string>& datasetNames, const std::string& datasourceId);
90
91 TEDATAACCESSEXPORT std::string GetDataSetCategoryName(int category);
92
93 TEDATAACCESSEXPORT bool HasDataSet(const std::string& datasourceId);
94
95 TEDATAACCESSEXPORT DataSet* GetDataSet(const std::string& name, const std::string& datasourceId);
96
97 TEDATAACCESSEXPORT DataSetType* GetDataSetType(const std::string& name, const std::string& datasourceId);
98
99 /*!
100 \brief Search for a data source with the informed id in the DataSourceManager.
101
102 If the data source is not found in that manager it will try to get some information
103 in the DataSourceInfoManager and will create a new data source instance,
104 storing a reference to the new data source in the manager.
105
106 \param datasourceId The data source to look for.
107 \param opened Automatically open the data source.
108
109 \return A data source with the informed id.
110
111 \exception Exception It throws an exception if the informed data source could not be retrieved.
112 */
113 TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string& datasourceId, const bool opened = true);
114
115 /*!
116 \brief Returns an empty ObjectIdSet, with the definitions of fields that compose it.
117
118 \param type[in] A pointer to a valid data set type. Do not pass null.
119
120 \param set[out] The ObjectIdSet containing only the the fields definitions. This pointer will be instantiated inside the method.
121
122 \note The caller WILL TAKE the ownership of \a set.
123 */
125
126 /*
127 \brief It returns the property names used to generate the object ids.
128
129 This method first looks for the primary key properties defined on data set type.
130 If they do not exist it looks for the unique keys. If they do not exist then it returns all the properties.
131
132 \param type A pointer to a valid data set type. Do not pass null.
133 \param pnames The vector that will be filled with the property names.
134 */
135 TEDATAACCESSEXPORT void GetOIDPropertyNames(const DataSetType* type, std::vector<std::string>& pnames);
136
137 /*
138 \brief It returns the name of the base dataset of a linked dataset
139 and how many of it's properties are a part of the objectId
140
141 \param type A pointer to a valid data set type. Do not pass null.
142 \param pnames The pair that will be filled with the dataset name and the number of properties.
143 */
144 TEDATAACCESSEXPORT void GetOIDDatasetProps(const DataSetType* type, std::pair<std::string, int>& dsProps);
145
146 /*
147 \brief It returns the property positions used to generate the object ids.
148
149 This method first looks for the primary key properties defined on data set type.
150 If they do not exist it looks for the unique keys. If they do not exist then it returns all the properties.
151
152 \param type A pointer to a valid data set type. Do not pass null.
153 \param pnames The vector that will be filled with the property names.
154 */
155 TEDATAACCESSEXPORT void GetOIDPropertyPos(const DataSetType* type, std::vector<std::size_t>& ppos);
156
157 /*
158 \function getBasePkey
159 \brief Function used to acquire the string that represents the objectId of the base dataset.
160
161 \param oid The objectId as returned from the dataset;
162 \param dsProps A pair that indicates the name of the base dataset and how many key properties it's got
163
164 \note Will return the whole objectId as a string unless the dataset of interest is based on a linked layer,
165 otherwise it returns a string that represents the objectId of the base Dataset.
166 \note It will not take ownership of the given objectId pointer
167 */
168 TEDATAACCESSEXPORT std::string getBasePkey(te::da::ObjectId* oid, std::pair<std::string, int>& dsProps);
169
170 /*
171 \brief It generates the set of object ids for every element of the given dataset.
172
173 This method tries to use the primary key properties defined on data set type to generate the object ids.
174 If they do not exist it tries to use unique keys. If they do not exist then it uses all the properties.
175
176 \param dataset A pointer to a valid data set. Do not pass null.
177 \param type A pointer to a data set type that describes the given dataset. Do not pass null.
178
179 \return The object id set generated from the given dataset.
180 */
182
183 /*
184 \brief It generates the set of object ids for every element of the given dataset using a set of attributes.
185
186 \param dataset A pointer to a valid data set.
187 \param names A non empty vector of property names to be used to identify the elements.
188
189 \return The object id set generated from the given dataset.
190
191 \exception Exception It throws an exception if a property was not found in data set
192 */
193 TEDATAACCESSEXPORT ObjectIdSet* GenerateOIDSet(DataSet* dataset, const std::vector<std::string>& names);
194
195 /*
196 \brief It generates an object id for the current element of the given dataset using the informed set of attributes.
197
198 \param dataset A pointer to a valid data set.
199 \param names A non empty vector of property names to be used to identify the element.
200
201 \return The object id generated for the current element of the given dataset.
202 */
203 TEDATAACCESSEXPORT ObjectId* GenerateOID(DataSet* dataset, const std::vector<std::string>& names);
204
205 /*!
206 \brief It returns the first dataset spatial property or NULL if none is found.
207
208 \param dataset The dataset to search for a spatial property.
209
210 \return The first dataset spatial property or NULL if none is found.
211 */
213
214 TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet* dataset, int datatype);
215
216 TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet* dataset, const std::string& name);
217
218 TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSetType* dt, const std::string& name);
219
221
223
225
227 std::vector<std::string>& pnames,
228 std::vector<int>& ptypes);
229
230 TEDATAACCESSEXPORT void GetPropertyInfo(const DataSet* const dataset,
231 std::vector<std::string>& pnames,
232 std::vector<int>& ptypes);
233
234 /*!
235 \brief It creates the dataset definition in a data source and then fill it with data from the input dataset.
236
237 This function will create the dataset schema definition and will
238 save all the dataset data.
239
240 \param t The data source transactor.
241 \param dt The source dataset definition.
242 \param d The source dataset data.
243 \param limit The number of items to be used from the input dataset. If set to 0 (default) all items are used.
244
245 \pre All parameters must be valid pointers.
246
247 \post It is the caller responsability to release the dataset 'd' pointer.
248
249 \exception Exception It throws an exception if the dataset can not be created.
250
251 \note DataSetPersistence will start reading the dataset 'd' in the
252 current position. So, keep in mind that it is the caller responsability
253 to inform the dataset 'd' in the right position (and a valid one) to start processing it.
254 */
255 TEDATAACCESSEXPORT void Create(DataSource* ds, DataSetType* dt, DataSet* d, std::size_t limit = 0);
256
257 /*!
258 \brief It creates the dataset definition in a data source and then fill it with data from the input dataset.
259
260 This method will create the dataset schema definition and will
261 save all the dataset data.
262
263 \param dt The source dataset definition.
264 \param d The source dataset data.
265 \param options A list of optional modifiers. It is driver specific.
266 \param limit The number of items to be used from the input dataset. If set to 0 (default) all items are used.
267
268 \pre All parameters must be valid pointers.
269
270 \exception Exception It throws an exception if the dataset can not be created.
271
272 \note It is the caller responsability to release the dataset 'd' pointer.
273
274 \note DataSetPersistence will start reading the dataset 'd' in the
275 current position. So, keep in mind that it is the caller responsability
276 to inform the dataset 'd' in the right position (and a valid one) to start processing it.
277 */
279 DataSetType* dt,
280 DataSet* d,
281 const std::map<std::string, std::string>& options,
282 std::size_t limit = 0);
283
284 TEDATAACCESSEXPORT bool HasOption(const std::map<std::string, std::string>& options, const std::string& option);
285
287
288 TEDATAACCESSEXPORT void AssociateDataSetTypeConverterSRID(DataSetTypeConverter* converter, const int& inputSRID, const int& outputSRID = TE_UNKNOWN_SRS);
289
291
292 TEDATAACCESSEXPORT std::string GetSQLValueNames(const DataSet* dataset);
293
295
296 TEDATAACCESSEXPORT std::unique_ptr<Fields> BuildFields(const std::vector<std::string>& properties);
297
298 TEDATAACCESSEXPORT std::unique_ptr<Expression> BuildSpatialOp(Expression* e1,
299 Expression* e2,
301
302 TEDATAACCESSEXPORT std::unique_ptr<Select> BuildSelect(const std::string& dsname);
303
304 TEDATAACCESSEXPORT std::unique_ptr<Select> BuildSelect(const std::string& dsname,
305 const std::string& propertyName);
306
307 TEDATAACCESSEXPORT std::unique_ptr<Select> BuildSelect(const std::string& dsname,
308 const std::vector<std::string>& properties);
309
310 TEDATAACCESSEXPORT std::unique_ptr<Select> BuildSelect(const std::string& dsname,
311 const std::vector<std::string>& properties,
312 const std::string& geometryProperty,
313 const te::gm::Envelope* e,
314 int srid,
316
317 TEDATAACCESSEXPORT std::unique_ptr<Select> BuildSelect(const std::string& dsname,
318 const std::vector<std::string>& properties,
319 const std::string& geometryProperty,
322
323 TEDATAACCESSEXPORT std::unique_ptr<Select> BuildSelect(const std::string& dsname,
324 const std::vector<std::string>& properties,
325 const ObjectIdSet* oids);
326
327
328 TEDATAACCESSEXPORT int GetPropertyIndex(te::da::DataSet* dataSet, const std::string propName);
329
330 /*!
331 \brief It checks if the name is not valid as the existence of invalid characters, reserved words, and others.
332
333 \param name Name that will be checked.
334 \param invalidChar Records the invalid character.
335
336 \return If the name is valid.
337 */
338 TEDATAACCESSEXPORT bool IsValidName(const std::string& name, std::string& invalidChar);
339
340 /*!
341 \brief It checks if the datasettype has a linked table.
342
343 \param type The Datasettype.
344
345 \return True if has linked table.
346 */
348
349 /*!
350 \brief It hide columns of a DataSet using DataSetAdapter.
351
352 \param ds The DataSet that will have hidden columns.
353 \param dst The DataSetType used to hide columns.
354 \param columns names to be hidden.
355
356 \return The DataSet result. The caller will take the ownership of the returned DataSet.
357 */
358 TEDATAACCESSEXPORT std::unique_ptr<te::da::DataSet> HideColumns(te::da::DataSet* ds, te::da::DataSetType* dst, const std::vector<std::string>& columns);
359
360 /*!
361 \brief It gets the summarized value.
362
363 \param values The input values.
364 \param summary The summary mode. It can be: "MIN", "MAX", "SUM", "AVERAGE", "MEDIAN", "STDDEV" or "VARIANCE"
365
366 \return The summarized value.
367 */
368 TEDATAACCESSEXPORT double GetSummarizedValue(std::vector<double>& values, const std::string& summary);
369
370 /*!
371 \brief It gets the summarized value.
372
373 \param values The input values.
374 \param summary The summary mode. It can be: "MIN" or "MAX"
375
376 \return The summarized value.
377 */
378 TEDATAACCESSEXPORT std::string GetSummarizedValue(const std::vector<std::string>& values, const std::string& sumary);
379
380 /*!
381 \brief It gets the round value.
382
383 \param value The input value.
384
385 \return The rounded value.
386 */
387 TEDATAACCESSEXPORT double Round(const double& value, const size_t& precision);
388
389 /*!
390 \brief It gets the value as double.
391
392 \param ds The input dataset.
393 \param pos The column position.
394
395 \return The double value. Default value is 0.
396 */
397 TEDATAACCESSEXPORT double GetValueAsDouble(const te::da::DataSet* ds, const size_t pos);
398
399 /*!
400 \brief Get alias based on a input name
401
402 \param fullName name composed by table/schema.name
403
404 \return string of the right side of dot "."
405 */
406 TEDATAACCESSEXPORT std::string GetAliasName(std::string fullName);
407
408
409 /*!
410 \brief Creates the concrete literal class based on the given abstract data
411
412 \param abstractData The abstract data to be converted into a Literal
413
414 \return The concrete literal class based on the given abstract data
415 */
417
418 //!< //Creates an adapter to handle correctly the primary key and autonumber atributes. The adapter will handle the destruction of the dataSet
419 TEDATAACCESSEXPORT std::unique_ptr<te::da::DataSet> CreateAdapterToHandlePersistence(const te::da::DataAccess* destinationDataAccess, te::da::DataSet* inputDataSet);
420
421 //!< //Creates an adapter to handle correctly the primary key and autonumber atributes. The adapter will handle the destruction of the dataSet
422 TEDATAACCESSEXPORT std::unique_ptr<te::da::DataSet> CreateAdapterToHandlePersistence(const te::da::DataSetType* destinationDataSetType, const te::da::DataSourceCapabilities* capabilities, te::da::DataSet* inputDataSet);
423
424 //!< Creates a simplified version of the dataSetType based on the information present in the given dataSet
425 TEDATAACCESSEXPORT std::unique_ptr<te::da::DataSetType> CreateDataSetType(const std::string& dataSetName, te::da::DataSet* dataSet);
426
427 //!< Creates a FieldNameValidator object based on the given DataSourceCapabilities
429
430 //!< This function will prepare the given 'inputDataSetType' by validating the names of the properties of the dataSet and replacing them with fixed names if necessary (including possible repeated names after an adjust). The property order will not be changed
431 TEDATAACCESSEXPORT std::unique_ptr<te::da::DataSetType> PrepareDateSetType(const te::da::DataSetType* dataSetType, const te::da::DataSourceCapabilities* capabilities);
432
433 //!< Creates a converter between the given inputDataSetType and outputDataSetType. It handles different order of properties and different names in spatial property. It will handle limitations if the optional 'outputCapabilities' parameter is given
434 TEDATAACCESSEXPORT std::unique_ptr<te::da::DataSetTypeConverter> CreateConverterForDataSetType(const te::da::DataSetType* inputDataSetType, const te::da::DataSetType* outputDataSetType, const te::da::DataSourceCapabilities* outputCapabilities);
435
436 //!< Removes the auto-increment property from the converter. This is done to allow the destination dataSource to generated new values for each saved data
438
439 //!< Converts a DataAccess to its String representation
441
442 //!< Converts the String representtion of a DataAccess to the concrete class
444
445 } // end namespace da
446} // end namespace te
447
448#endif // __TERRALIB_DATAACCESS_INTERNAL_UTILS_H
449
te::da::DataSourceCapabilities capabilities
Class used to centralize and control access to data in terralib. It aims to create a high-level inter...
Definition: DataAccess.h:77
An adapter for DataSet.
An converter for DataSetType.
A class that models the description of a dataset.
Definition: DataSetType.h:73
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
An abstract class for data providers like a DBMS, Web Services or a regular file.
Definition: DataSource.h:120
This is an abstract class that models a query expression.
Definition: Expression.h:48
This class is responsible for validating field names. It can handle size limits, fix special characte...
This class models a literal value.
Definition: Literal.h:54
This class represents a set of unique ids created in the same context. i.e. from the same data set.
Definition: ObjectIdSet.h:56
This class represents an unique id for a data set element.
Definition: ObjectId.h:48
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:56
It models a property definition.
Definition: Property.h:60
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Geometric property.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
Raster property.
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetTypeConverter > CreateConverterForDataSetType(const te::da::DataSetType *inputDataSetType, const te::da::DataSetType *outputDataSetType, const te::da::DataSourceCapabilities *outputCapabilities)
Removes the auto-increment property from the converter. This is done to allow the destination dataSou...
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetType > CreateDataSetType(const std::string &dataSetName, te::da::DataSet *dataSet)
Creates a FieldNameValidator object based on the given DataSourceCapabilities.
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > CreateAdapterToHandlePersistence(const te::da::DataAccess *destinationDataAccess, te::da::DataSet *inputDataSet)
//Creates an adapter to handle correctly the primary key and autonumber atributes....
TEDATAACCESSEXPORT int GetPropertyIndex(te::da::DataSet *dataSet, const std::string propName)
TEDATAACCESSEXPORT std::string GetSQLValueNames(const DataSetType *dt)
TEDATAACCESSEXPORT std::vector< int > GetPropertyDataTypes(const te::da::DataSet *dataset)
TEDATAACCESSEXPORT te::da::FieldNameValidator CreateValidator(const te::da::DataSourceCapabilities *capabilities)
This function will prepare the given 'inputDataSetType' by validating the names of the properties of ...
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 void RemoveAutoIncrementProperties(te::da::DataSetTypeConverter *converter)
Converts a DataAccess to its String representation.
TEDATAACCESSEXPORT bool HasLinkedTable(te::da::DataSetType *type)
It checks if the datasettype has a linked table.
TEDATAACCESSEXPORT ObjectId * GenerateOID(DataSet *dataset, const std::vector< std::string > &names)
TEDATAACCESSEXPORT te::dt::AbstractData * DataAccessToStringConverter(te::dt::AbstractData *absData)
Converts the String representtion of a DataAccess to the concrete class.
TEDATAACCESSEXPORT void GetOIDPropertyNames(const DataSetType *type, std::vector< std::string > &pnames)
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetType > PrepareDateSetType(const te::da::DataSetType *dataSetType, const te::da::DataSourceCapabilities *capabilities)
Creates a converter between the given inputDataSetType and outputDataSetType. It handles different or...
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
TEDATAACCESSEXPORT void GetPropertyInfo(const DataSetType *const dt, std::vector< std::string > &pnames, std::vector< int > &ptypes)
TEDATAACCESSEXPORT void GetDataSetNames(std::vector< std::string > &datasetNames, const std::string &datasourceId)
TEDATAACCESSEXPORT bool HasDataSet(const std::string &datasourceId)
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
TEDATAACCESSEXPORT bool HasOption(const std::map< std::string, std::string > &options, const std::string &option)
TEDATAACCESSEXPORT void LoadFull(te::da::DataSetType *dataset, const std::string &datasourceId)
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
TEDATAACCESSEXPORT void GetEmptyOIDSet(const DataSetType *type, ObjectIdSet *&set)
Returns an empty ObjectIdSet, with the definitions of fields that compose it.
TEDATAACCESSEXPORT DataSetAdapter * CreateAdapter(DataSet *ds, DataSetTypeConverter *converter, bool isOwner=false)
TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet *dataset, const std::string &name)
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 std::unique_ptr< Select > BuildSelect(const std::string &dsname)
TEDATAACCESSEXPORT double Round(const double &value, const size_t &precision)
It gets the round value.
TEDATAACCESSEXPORT double GetSummarizedValue(std::vector< double > &values, const std::string &summary)
It gets the summarized value.
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 te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
TEDATAACCESSEXPORT void GetOIDDatasetProps(const DataSetType *type, std::pair< std::string, int > &dsProps)
TEDATAACCESSEXPORT std::unique_ptr< Fields > BuildFields(const std::vector< std::string > &properties)
TEDATAACCESSEXPORT te::rst::RasterProperty * GetFirstRasterProperty(const DataSetType *dt)
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 te::dt::Property * GetFirstSpatialProperty(const DataSetType *dt)
TEDATAACCESSEXPORT DataSet * GetDataSet(const std::string &name, const std::string &datasourceId)
TEDATAACCESSEXPORT std::size_t GetFirstSpatialPropertyPos(const te::da::DataSet *dataset)
It returns the first dataset spatial property or NULL if none is found.
TEDATAACCESSEXPORT void LoadProperties(te::da::DataSetType *dataset, const std::string &datasourceId)
TEDATAACCESSEXPORT te::da::Literal * GetLiteralFromAbstractData(const te::dt::AbstractData *abstractData)
Creates the concrete literal class based on the given abstract data.
TEDATAACCESSEXPORT double GetValueAsDouble(const te::da::DataSet *ds, const size_t pos)
It gets the value as double.
TEDATAACCESSEXPORT te::gm::Envelope * GetExtent(const std::string &datasetName, const std::string &propertyName, const std::string &datasourceId)
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
TEDATAACCESSEXPORT std::string getBasePkey(te::da::ObjectId *oid, std::pair< std::string, int > &dsProps)
TEDATAACCESSEXPORT std::unique_ptr< Expression > BuildSpatialOp(Expression *e1, Expression *e2, te::gm::SpatialRelation r)
TEDATAACCESSEXPORT std::string GetAliasName(std::string fullName)
Get alias based on a input name.
TEDATAACCESSEXPORT te::dt::AbstractData * StringToDataAccessConverter(te::dt::AbstractData *absData)
TEDATAACCESSEXPORT ObjectIdSet * GenerateOIDSet(DataSet *dataset, const DataSetType *type)
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:128
TerraLib.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
Definition: Config.h:43