All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
STDataLoader.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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 STDataLoader.h
22 
23  \brief This file contains a class that contains a set of static methods
24  to load spatiotemporal data from data sources.
25 */
26 
27 #ifndef __TERRALIB_ST_INTERNAL_STDATALOADER_H
28 #define __TERRALIB_ST_INTERNAL_STDATALOADER_H
29 
30 //TerraLib
31 #include "../../common/Enums.h"
32 #include "../../geometry/Enums.h"
33 #include "../../geometry/Envelope.h"
34 #include "../../datatype/Enums.h"
35 
36 //ST
37 #include "../Config.h"
38 #include "../core/coverage/CoverageSeriesDataSetInfo.h"
39 
40 //STL
41 #include <memory>
42 
43 //Boost
44 #include <boost/ptr_container/ptr_vector.hpp>
45 
46 // Forward declarations
47 namespace te { namespace gm { class Geometry; } }
48 namespace te { namespace dt { class DateTime; class DateTimePeriod; } }
49 
50 namespace te
51 {
52  namespace st
53  {
54  // Forward declarations
55  class ObservationDataSet;
56  class TrajectoryDataSet;
57  class TimeSeriesDataSet;
58  class ObservationDataSetInfo;
59  class TrajectoryDataSetInfo;
60  class TimeSeriesDataSetInfo;
61  class CoverageSeriesDataSetInfo;
62  class PointCoverageDataSetInfo;
63  class RasterCoverageDataSetInfo;
64  class Trajectory;
65  class TimeSeries;
66  class CoverageSeries;
67  class PointCoverage;
68  class AbstractPointCoverageInterp;
69  class RasterCoverage;
70 
71  /*!
72  \class STDataLoader
73 
74  \brief A class that contains a set of static methods to load spatiotemporal
75  data from data sources.
76 
77  \ingroup st
78 
79  \note Before using the methods of this class, certify that the Data Source exists in the DataSourceManager
80  \note The methods of this class can throw an Exception when internal errors occur.
81 
82  \sa ObservationDataSet ObservationDataSetInfo
83  \sa TrajectoryDataSet TrajectoryDataSetInfo
84  \sa CoverageSeriesDataSet CoverageSeriesDataSetInfo
85  */
87  {
88  public:
89 
90  /*! \name Operations for loading ObservationDataSet */
91  //@{
92 
93  /*!
94  \brief It returns a ObservationDataSet, that is, a DataSet that contains observations.
95 
96  \param info Information about the DataSource which the observation are from and
97  the DataSet which contains the observations.
98  \param travType The traverse type associated to the returned dataset.
99 
100  \return A pointer to a new ObservationDataSet.
101 
102  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
103  its "id" is correct in the info parameter
104  \note The caller will take the ownership of the returned pointer.
105  \note It can throw an Exception when internal errors occur.
106  */
107  static std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
109 
110  /*!
111  \brief It returns a data set with observations whose observed geometries satisfy a
112  given spatial relation.
113 
114  \param info Information about the DataSource which the observation are from and
115  the DataSet which contains the observations.
116  \param e A given envelope.
117  \param r A given spatial relation.
118  \param travType The traverse type associated to the returned dataset.
119 
120  \return A pointer to a new ObservationDataSet.
121 
122  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
123  its "id" is correct in the info parameter
124  \note The caller will take the ownership of the returned pointer.
125  \note It can throw an Exception when internal errors occur.
126  */
127  static std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info, const te::gm::Envelope& e,
130 
131  /*!
132  \brief It returns a data set with observations whose observed geometries satisfy a
133  given spatial relation.
134 
135  The possible spatial relations implemented here are: INTERSECTS
136 
137  \param info Information about the DataSource which the observation are from and
138  the DataSet which contains the observations.
139  \param geom A given geometry.
140  \param r A given spatial relation.
141  \param travType The traverse type associated to the returned dataset.
142 
143  \return A pointer to a new ObservationDataSet.
144 
145  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
146  its "id" is correct in the info parameter
147  \note The caller will take the ownership of the returned pointer.
148  \note It can throw an Exception when internal errors occur.
149  */
150  static std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info, const te::gm::Geometry& geom,
153 
154  /*!
155  \brief It returns a data set with observations whose phenomenon times satisfy a
156  given temporal relation.
157 
158  The possible temporal relations are: 1. AFTER;
159  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
160 
161  \param info Information about the DataSource which the observation are from and
162  the DataSet which contains the observations.
163  \param dt A given datetime.
164  \param r A given temporal relation.
165  \param travType The traverse type associated to the returned dataset.
166 
167  \return A pointer to a new ObservationDataSet.
168 
169  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
170  its "id" is correct in the info parameter
171  \note The caller will take the ownership of the returned pointer.
172  \note When the temporal relation is DURING, dt must be a time period.
173  \note It can throw an Exception when internal errors occur.
174  */
175  static std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
178 
179  /*!
180  \brief It returns a data set with observations whose observed geometries
181  satisfy a given spatial relation and phenomenon times satisfy a given temporal relation.
182 
183  The possible temporal relations are: 1. AFTER;
184  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
185 
186  \param info Information about the DataSource which the observation of trajectpries
187  are from and the DataSet which contains the observations.
188  \param dt A given datetime.
189  \param tr A given temporal relation.
190  \param e A given envelope.
191  \param sr A given spatial relation.
192  \param travType The traverse type associated to the returned dataset.
193 
194  \return A pointer to a new ObservationDataSet.
195 
196  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
197  its "id" is correct in the info parameter
198  \note The caller will take the ownership of the returned pointer.
199  \note When the temporal relation is DURING, dt must be a time period.
200  \note It can throw an Exception when internal errors occur.
201  */
202 
203  static std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
204  const te::dt::DateTime& dt,
206  const te::gm::Envelope& e,
209 
210  /*!
211  \brief It returns a data set with observations whose observed geometries satisfy a
212  given spatial relation and phenomenon times satisfy a given temporal relation.
213 
214  The possible spatial relations are: INTERSECTS
215  The possible temporal relations are: 1. AFTER;
216  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
217 
218  \param info Information about the DataSource which the observation are from and
219  the DataSet which contains the observations.
220  \param geom A given geometry.
221  \param sr A given spatial relation.
222  \param dt A given datetime.
223  \param tr A given temporal relation.
224  \param travType The traverse type associated to the returned dataset.
225 
226  \return A pointer to a new ObservationDataSet.
227 
228  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
229  its "id" is correct in the info parameter
230  \note The caller will take the ownership of the returned pointer.
231  \note It will NOT take the ownership of the given pointers.
232  \note When the temporal relation is DURING, dt must be a time period.
233  \note It can throw an Exception when internal errors occur.
234  */
235  static std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
239  //@}
240 
241  /*! \name Operations for loading TrajectoryDataSet */
242  //@{
243 
244  /*!
245  \brief It returns the information about all trajectories that exist in a single DataSet.
246 
247  The information about the DataSource and DataSet that contains trajectories is defined
248  as a TrajectoryDataSetInfo (input parameter).
249 
250  The information about each trajectory (its correct id) is returned as a
251  TrajectoryDataSetInfo of the parameter output.
252  These results can be used to create TrajectoryDataSetLayers.
253 
254  \param input The information about the DataSource and DataSet that contains trajectories
255  \param output The information about each trajectory (its correct id).
256 
257  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
258  its "id" is correct in the info parameter
259  \note It can throw an Exception when internal errors occur.
260  */
261  static void getInfo( const TrajectoryDataSetInfo& input,
262  std::vector<TrajectoryDataSetInfo>& output);
263 
264  /*!
265  \brief It returns a data set with observations of trajectories.
266 
267  When the DataSet contains more than one trajectory, the info parameter
268  (TrajectoryDataSetInfo) must contain the id of the desire trajectory that
269  must be returned as a TrajectoryDataSet.
270 
271  \param info Information about the DataSource which the observations of a trajectory
272  are from and the DataSet which contains these observations.
273  \param travType The traverse type associated to the returned datasets.
274  \param rwRole The read and write permission associated to the returned datasets.
275  \return The returned TrajectoryDataSet.
276 
277  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
278  its "id" is correct in the info parameter
279  \note The caller will take the ownership of the returned pointer.
280  \note It can throw an Exception when internal errors occur.
281  */
282  static std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
284 
285  /*!
286  \brief It returns patches of a trajectory whose geometries
287  satisfy a given spatial relation.
288 
289  When the DataSet contains more than one trajectory, the info parameter
290  (TrajectoryDataSetInfo) must contain the id of the desire trajectory that
291  must be returned as a TrajectoryDataSet.
292 
293  The possible spatial relations implemented here are: INTERSECTS
294 
295  \param info Information about the DataSource which the observations of a trajectory
296  are from and the DataSet which contains these observations.
297  \param geom A given geometry.
298  \param r A given spatial relation.
299  \param travType The traverse type associated to the returned dataset.
300 
301  \return The returned trajectoy data set.
302 
303  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
304  its "id" is correct in the info parameter
305  \note The caller will take the ownership of the returned pointer.
306  \note It can throw an Exception when internal errors occur.
307  */
308  static std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
311 
312  /*!
313  \brief It returns patches of a trajectory whose geometries
314  satisfy a given spatial relation.
315 
316  When the DataSet contains more than one trajectory, the info parameter
317  (TrajectoryDataSetInfo) must contain the id of the desire trajectory that
318  must be returned as a TrajectoryDataSet.
319 
320  \param info Information about the DataSource which the observations of a trajectory are from
321  and the DataSet which contains the observations.
322  \param e A given envelope.
323  \param r A given spatial relation.
324  \param travType The traverse type associated to the returned dataset.
325 
326  \return The returned trajectoy data set.
327 
328  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
329  its "id" is correct in the info parameter
330  \note The caller will take the ownership of the returned pointer.
331  \note It can throw an Exception when internal errors occur.
332  */
333  static std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
336 
337  /*!
338  \brief It returns a data set with observations of trajectories whose times
339  satisfy a given temporal relation.
340 
341  When the DataSet contains more than one trajectory, the info parameter
342  (TrajectoryDataSetInfo) must contain the id of the desire trajectory that
343  must be returned as a TrajectoryDataSet.
344 
345  The possible temporal relations are: 1. AFTER;
346  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
347 
348  \param info Information about the DataSource which the observation of trajectpries
349  are from and the DataSet which contains the observations.
350  \param dt A given datetime.
351  \param r A given temporal relation.
352  \param travType The traverse type associated to the returned dataset.
353 
354  \return A pointer to a new TrajectoryDataSet.
355 
356  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
357  its "id" is correct in the info parameter
358  \note The caller will take the ownership of the returned pointer.
359  \note When the temporal relation is DURING, dt must be a time period.
360  \note It can throw an Exception when internal errors occur.
361  */
362  static std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
365 
366  /*!
367  \brief It returns patches of a trajectory whose envelope
368  satisfy a given spatial relation and times satisfy a given temporal relation.
369 
370  When the DataSet contains more than one trajectory, the info parameter
371  (TrajectoryDataSetInfo) must contain the id of the desire trajectory that
372  must be returned as a TrajectoryDataSet.
373 
374  The possible temporal relations are: 1. AFTER;
375  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
376 
377  \param info Information about the DataSource which the observation of trajectpries
378  are from and the DataSet which contains the observations.
379  \param dt A given datetime.
380  \param tr A given temporal relation.
381  \param e A given envelope.
382  \param sr A given spatial relation.
383  \param travType The traverse type associated to the returned dataset.
384 
385  \return A pointer to a new TrajectoryDataSet.
386 
387  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
388  its "id" is correct in the info parameter
389  \note The caller will take the ownership of the returned pointer.
390  \note When the temporal relation is DURING, dt must be a time period.
391  \note It can throw an Exception when internal errors occur.
392  */
393  static std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
394  const te::dt::DateTime& dt,
396  const te::gm::Envelope& e,
399 
400  /*!
401  \brief It returns patches of a trajectory whose geometries
402  satisfy a given spatial relation and times satisfy a given temporal relation.
403 
404  When the DataSet contains more than one trajectory, the info parameter
405  (TrajectoryDataSetInfo) must contain the id of the desire trajectory that
406  must be returned as a TrajectoryDataSet.
407 
408  The possible spatial relations are: INTERSECTS
409  The possible temporal relations are: 1. AFTER;
410  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
411 
412  \param info Information about the DataSource which the observations of trajectories
413  are from and the DataSet which contains these observations.
414  \param geom A given geometry.
415  \param sr A given spatial relation.
416  \param dt A given datetime.
417  \param tr A given temporal relation.
418  \param travType The traverse type associated to the returned dataset.
419 
420  \return The returned trajectoy data set.
421 
422  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
423  its "id" is correct in the info parameter
424  \note The caller will take the ownership of the returned pointer.
425  \note It will NOT take the ownership of the given pointers.
426  \note When the temporal relation is DURING, dt must be a time period.
427  \note It can throw an Exception when internal errors occur.
428  */
429  static std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
433  //@}
434 
435  /*! \name Operations for loading TimeSeriesDataSet */
436  //@{
437 
438  /*!
439  \brief It returns the information about all time series that exist in a single DataSet.
440 
441  The information about the DataSource and DataSet that contains time series is defined
442  as a TimeSeriesDataSetInfo (input parameter).
443 
444  The information about each time series (its correct id) is returned as a
445  TimeSeriesDataSetInfo of the parameter output.
446  These results can be used to create TimeSeriesDataSetLayers.
447 
448  \param input The information about the DataSource and DataSet that contains time series
449  \param output The information about each time series (its correct id).
450 
451  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
452  its "id" is correct in the info parameter
453  \note It can throw an Exception when internal errors occur.
454  */
455  static void getInfo( const TimeSeriesDataSetInfo& input,
456  std::vector<TimeSeriesDataSetInfo>& output);
457 
458  /*!
459  \brief It returns a data set with observations of time series.
460 
461  When the DataSet contains more than one time series, the info parameter
462  (TimeSeriesDataSetInfo) must contain the id of the desire time series that
463  must be returned as a TimeSeriesDataSet.
464 
465  \param info Information about the DataSource which the observations of a time series
466  are from and the DataSet which contains these observations.
467  \param travType The traverse type associated to the returned datasets.
468 
469  \return The returned TrajectoryDataSet.
470 
471  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
472  its "id" is correct in the info parameter
473  \note The caller will take the ownership of the returned pointer.
474  \note It can throw an Exception when internal errors occur.
475  */
476  static std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info,
478 
479  /*!
480  \brief It returns a data set with observations of time series whose times
481  satisfy a given temporal relation.
482 
483  When the DataSet contains more than one time series, the info parameter
484  (TimeSeriesDataSetInfo) must contain the id of the desire time series that
485  must be returned as a TimeSeriesDataSet.
486 
487  The possible temporal relations are: 1. AFTER;
488  2. AFTER | EQUALS; 3. BEFORE; 4. BEFORE | EQUALS; 5. DURING; 6. EQUALS
489 
490  \param info Information about the DataSource which the observation of time series
491  are from and the DataSet which contains the observations.
492  \param dt A given datetime.
493  \param r A given temporal relation.
494  \param travType The traverse type associated to the returned dataset.
495 
496  \return A pointer to a new TimeSeriesDataSet.
497 
498  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
499  its "id" is correct in the info parameter
500  \note The caller will take the ownership of the returned pointer.
501  \note When the temporal relation is DURING, dt must be a time period.
502  \note It can throw an Exception when internal errors occur.
503  */
504  static std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info,
507 
508  //@}
509 
510  /*! \name Operations for loading spatiotemporal data types
511  (TimeSeries, Trajetory, CoverageSeries) directly from data sources, without using
512  DataSets. */
513  //@{
514 
515  /*!
516  \brief It returns a point coverage series.
517 
518  \param info Information about the DataSource which the observations of a coverage series
519  are from and the data sets which contain these observations.
520  \param interp The interpolator associated to each
521 
522  \return The returned CoverageSeries.
523 
524  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
525  its "id" is correct in the info parameter
526  \note The caller will take the ownership of the returned pointer.
527  \note It can throw an Exception when internal errors occur.
528  */
529  static std::auto_ptr<CoverageSeries> getCoverageSeries( const PointCoverageSeriesDataSetInfo& info,
530  AbstractPointCoverageInterp* interp);
531 
532  /*!
533  \brief It returns a raster coverage series.
534 
535  \param info Information about the DataSource which the observations of a coverage series
536  are from and the data sets which contain these observations.
537 
538  \return The returned CoverageSeries.
539 
540  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
541  its "id" is correct in the info parameter
542  \note The caller will take the ownership of the returned pointer.
543  \note It can throw an Exception when internal errors occur.
544  */
545  static std::auto_ptr<CoverageSeries> getCoverageSeries(const RasterCoverageSeriesDataSetInfo& info);
546 
547  /*!
548  \brief It returns a raster coverage.
549 
550  \param info Information about the DataSource which the observations of a raster coverage
551  are from and the data sets which contain these observations.
552 
553  \return The returned RasterCoverage.
554 
555  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
556  its "id" is correct in the info parameter
557  \note The caller will take the ownership of the returned pointer.
558  \note It can throw an Exception when internal errors occur.
559  */
560  static std::auto_ptr<RasterCoverage> getCoverage(const RasterCoverageDataSetInfo& info);
561 
562  /*!
563  \brief It returns a point coverage.
564 
565  \param info Information about the DataSource which the observations of a point coverage
566  are from and the data sets which contain these observations.
567  \param interp The interpolator associated to the point coverage
568 
569  \return The returned PointCoverage.
570 
571  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
572  its "id" is correct in the info parameter
573  \note The caller will take the ownership of the returned pointer.
574  \note It will take the ownership of the given pointers.
575  \note It can throw an Exception when internal errors occur.
576  */
577  static std::auto_ptr<PointCoverage> getCoverage(const PointCoverageDataSetInfo& info,
579 
580  /*!
581  \brief It returns a time series associated to a point of a coverage series.
582 
583  If info contains information about raster coverages and its associated data source
584  supports raster data type, this function is executed by the data source.
585  Otherwise, it is executed in two steps: (1) creating a CoverageSeries type
586  and (2) using its method getTimeSeries.
587 
588  \param info Information about the DataSource which the observations of a coverage series
589  are from and the data sets which contain these observations.
590  \param p A given point.
591 
592  \return The returned CoverageSeries.
593 
594  \note The caller will take the ownership of the returned pointer.
595  \note It can throw an Exception when internal errors occur.
596 
597  \\TO DO: (1) vantagem de usar o DataSetCoverageDataSet é ele fica armazenado no driver
598  \\em memória (stmem) ao invés de toda hora gerar o CoverageSeries para cada ponto
599  \\que queremos extrair a time series.
600  */
601  //static std::auto_ptr<CoverageSeries> getTimeSeries(const CoverageSeriesDataSetInfo& info,
602  // const te::gm::Point& p);
603  //@}
604 
605  /*! \name Operations for loading temporal and spatial extent */
606  //@{
607 
608  /*!
609  \brief It returns the temporal extent of the data set with observations.
610 
611  \return The temporal extent of the observations.
612 
613  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
614  its "id" is correct in the info parameter
615  \note The caller will take the ownership of the returned pointer.
616  \note It will NOT take the ownership of the given pointer "info".
617  \note It can throw an Exception when internal errors occur.
618  */
619  static std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const ObservationDataSetInfo& info);
620 
621  /*!
622  \brief It returns the temporal extent of the data set with observations of a trajectory.
623 
624  \return The temporal extent of the observations of a trajectory.
625 
626  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
627  its "id" is correct in the info parameter
628  \note The caller will take the ownership of the returned pointer.
629  \note It will NOT take the ownership of the given pointer "info".
630  \note It can throw an Exception when internal errors occur.
631  */
632  static std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const TrajectoryDataSetInfo& info);
633 
634  /*!
635  \brief It returns the temporal extent of the data set with observations of a time series.
636 
637  \return The temporal extent of the observations of a time series.
638 
639  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
640  its "id" is correct in the info parameter
641  \note The caller will take the ownership of the returned pointer.
642  \note It will NOT take the ownership of the given pointer "info".
643  \note It can throw an Exception when internal errors occur.
644  */
645  static std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const TimeSeriesDataSetInfo& info);
646 
647  /*!
648  \brief It returns the temporal extent of the data set with observations of a coverage series.
649 
650  \return The temporal extent of the observations of a coverage series.
651 
652  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
653  its "id" is correct in the info parameter
654  \note The caller will take the ownership of the returned pointer.
655  \note It will NOT take the ownership of the given pointer "info".
656  \note It can throw an Exception when internal errors occur.
657  */
658  //static std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const CoverageSeriesDataSetInfo& info);
659 
660  /*!
661  \brief It returns the spatial extent of the observations, when there is an observed value of geometry type.
662 
663  \return The spatial extent of the observations.
664 
665  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
666  its "id" is correct in the info parameter
667  \note The caller will take the ownership of the returned pointer.
668  \note It can throw an Exception when internal errors occur.
669  */
670  static te::gm::Envelope getSpatialExtent(const ObservationDataSetInfo& info);
671 
672  /*!
673  \brief It returns the spatial extent of the observations of a trajectory.
674 
675  \return The spatial extent of the observations of a trajectory.
676 
677  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
678  its "id" is correct in the info parameter
679  \note The caller will take the ownership of the returned pointer.
680  \note It can throw an Exception when internal errors occur.
681  */
682  static te::gm::Envelope getSpatialExtent(const TrajectoryDataSetInfo& info);
683 
684  /*!
685  \brief It returns the spatial extent of the observations of a coverage series.
686 
687  \return The spatial extent of the observations of a coverage series.
688 
689  \note Before using this method, certify that the Data Source exists in the DataSourceManager and
690  its "id" is correct in the info parameter
691  \note The caller will take the ownership of the returned pointer.
692  \note It can throw an Exception when internal errors occur.
693  */
694  //static te::gm::Envelope getSpatialExtent(const CoverageSeriesDataSetInfo& info);
695  //@}
696 
697  /*!
698  \brief It initialize the STDataLoader
699 
700  It creates a ST Memory data source and adds it into the DataSourceManager.
701 
702  \note The user must use this method before using the other methods.
703  \note It can throw an Exception when internal errors occur.
704  */
705  static void initialize();
706 
707  /*!
708  \brief It finalize the STDataLoader
709 
710  It closes (cleans its iternal DataSets) ST Memory data source in the DataSourceManager.
711 
712  \note The user must use this method after using the STDataLoader.
713  \note It can throw an Exception when internal errors occur.
714  */
715  static void finalize();
716 
717  /*! \brief Virtual destructor. */
718  virtual ~STDataLoader();
719 
720  public:
721  static bool sm_STDataLoaderInitialized; //!< Indictes if the st data loader support was initialized
722 
723  protected:
724 
725  /*! \brief Protected constructor */
726  STDataLoader();
727  };
728 
729  } // end namespace st
730 } // end namespace te
731 
732 #endif // __TERRALIB_ST_INTERNAL_STDATALOADER_H
733 
734 
735 
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:90
A class that contains infos about a DataSet that contains observations.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
Definition: Enums.h:76
An abstract class for interpolation function or interpolator that estimate values at non-observaved l...
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:122
std::vector< RasterCoverageDataSetInfo > RasterCoverageSeriesDataSetInfo
A class that contains infos about a DataSource and DataSet that contains observations of a point cove...
std::vector< PointCoverageDataSetInfo > PointCoverageSeriesDataSetInfo
A class that contains a set of static methods to load spatiotemporal data from data sources...
Definition: STDataLoader.h:86
TraverseType
A dataset can be traversed in two ways:
Definition: Enums.h:53
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
A class that contains infos about a DataSet that contains observations of one or more trajectories...
A class that contains infos about a DataSet that contains observations of one or more time series...
static bool sm_STDataLoaderInitialized
Indictes if the st data loader support was initialized.
Definition: STDataLoader.h:721
A class that contains infos about a DataSource and DataSet that contains observations of a raster cov...