All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
STDataLoaderFromMemDS.cpp
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 STDataLoaderFromMemDS.cpp
22 
23  \brief This file contains a class responsible for loading spatiotemporal data
24  from a ST in-memory DataSource which contains an internal chache of
25  in-memory DataSets indexed by space and time.
26 */
27 
28 //TerraLib
29 #include "../../dataaccess/datasource/DataSourceInfo.h"
30 #include "../../dataaccess/datasource/DataSourceManager.h"
31 #include "../../dataaccess/dataset/DataSet.h"
32 #include "../../dataaccess/utils/Utils.h"
33 #include "../../datatype/DateTimePeriod.h"
34 
35 //STMEM
36 #include "../../stmemory/DataSource.h"
37 #include "../../stmemory/DataSet.h"
38 
39 //ST
40 #include "../Exception.h"
41 #include "../Utils.h"
42 #include "../Globals.h"
43 #include "STDataLoaderFromMemDS.h"
44 #include "../core/observation/ObservationDataSetInfo.h"
45 #include "../core/trajectory/TrajectoryDataSetInfo.h"
46 #include "../core/timeseries/TimeSeriesDataSetInfo.h"
47 #include "../core/observation/ObservationDataSet.h"
48 #include "../core/trajectory/TrajectoryDataSet.h"
49 #include "../core/timeseries/TimeSeriesDataSet.h"
50 
51 //STL
52 #include <vector>
53 
55 {
56  //use the DataSourceManager to get the DataSource
58 
59  if(m_ds.get()==0)
60  throw Exception("The STDataLoader is not inialized! Please, use the method STDataLoader::initialize");
61 
62  if(!m_ds->isOpened())
63  m_ds->open();
64 }
65 
66 std::auto_ptr<te::st::ObservationDataSet>
68  te::common::TraverseType travType)
69 {
70 
71  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
72  if(!m_ds->dataSetExists(info.getDataSetName()))
73  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
74  info.getEndTimePropIdx(), info.getGeomPropIdx());
75 
76  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getDataSetName(), travType));
77 
78  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
79 }
80 
81 
82 std::auto_ptr<te::st::ObservationDataSet>
85 {
86  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
87  if(!m_ds->dataSetExists(info.getDataSetName()))
88  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
89  info.getEndTimePropIdx(), info.getGeomPropIdx());
90 
91  //get the geometry property name
92  std::auto_ptr<te::da::DataSetType> dsettype(m_ds->getDataSetType(info.getDataSetName()));
93  std::string geomPropName = dsettype->getProperty(info.getGeomPropIdx())->getName();
94 
95  //get the data set applying he filter
96  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getDataSetName(), geomPropName, &e, r, travType));
97 
98  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
99 }
100 
101 std::auto_ptr<te::st::ObservationDataSet>
104 {
105  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
106  if(!m_ds->dataSetExists(info.getDataSetName()))
107  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
108  info.getEndTimePropIdx(), info.getGeomPropIdx());
109 
110  //get the geometry property name
111  std::auto_ptr<te::da::DataSetType> dsettype(m_ds->getDataSetType(info.getDataSetName()));
112  std::string geomPropName = dsettype->getProperty(info.getGeomPropIdx())->getName();
113 
114  //get the data set applying he filter
115  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getDataSetName(), geomPropName, &geom, r, travType));
116 
117  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
118 }
119 
120 std::auto_ptr<te::st::ObservationDataSet>
123  te::common::TraverseType travType)
124 {
125  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
126  if(!m_ds->dataSetExists(info.getDataSetName()))
127  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
128  info.getEndTimePropIdx(), info.getGeomPropIdx());
129 
130  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
131 
132  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(info.getDataSetName(), &dt, r, travType));
133 
134  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
135 }
136 
137 std::auto_ptr<te::st::ObservationDataSet>
139  const te::dt::DateTime& dt,
141  const te::gm::Envelope& e,
143  te::common::TraverseType travType)
144 {
145  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
146  if(!m_ds->dataSetExists(info.getDataSetName()))
147  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
148  info.getEndTimePropIdx(), info.getGeomPropIdx());
149 
150  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
151 
152  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(
153  info.getDataSetName(), &e, sr, &dt, tr, travType));
154 
155  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
156 }
157 
158 std::auto_ptr<te::st::ObservationDataSet>
162  te::common::TraverseType travType)
163 {
164  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
165  if(!m_ds->dataSetExists(info.getDataSetName()))
166  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
167  info.getEndTimePropIdx(), info.getGeomPropIdx());
168 
169  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
170 
171  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(info.getDataSetName(), &geom, sr, &dt, tr, travType));
172 
173  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
174 }
175 
176 void
177 te::st::STDataLoaderFromMemDS::getInfo( const TrajectoryDataSetInfo& /*input*/, std::vector<TrajectoryDataSetInfo>& /*output*/)
178 {
179  return;
180 }
181 
182 std::auto_ptr<te::st::TrajectoryDataSet>
184 {
185  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
186  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
187  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
191 
192  //get the data set
193  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getObservationDataSetInfo().getDataSetName(), travType));
194 
195  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
196 }
197 
198 std::auto_ptr<te::st::TrajectoryDataSet>
201  te::common::TraverseType travType)
202 {
203  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
204  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
205  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
209 
210  //get data set type to get the geometry property name
211  std::auto_ptr<te::da::DataSetType> dsettype(m_ds->getDataSetType(info.getObservationDataSetInfo().getDataSetName()));
212  std::string geomPropName = dsettype->getProperty(info.getGeomPropIdx())->getName();
213 
214  //get the data set, applying the spatial filter
215  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getObservationDataSetInfo().getDataSetName(),
216  geomPropName, &geom, r, travType));
217 
218  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
219 }
220 
221 std::auto_ptr<te::st::TrajectoryDataSet>
224  te::common::TraverseType travType)
225 {
226  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
227  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
228  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
232 
233  //get data set type to get the geometry property name
234  std::auto_ptr<te::da::DataSetType> dsettype(m_ds->getDataSetType(info.getObservationDataSetInfo().getDataSetName()));
235  std::string geomPropName = dsettype->getProperty(info.getGeomPropIdx())->getName();
236 
237  //get the data set, applying the spatial filter
238  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getObservationDataSetInfo().getDataSetName(),
239  geomPropName, &e, r, travType));
240 
241  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
242 }
243 
244 std::auto_ptr<te::st::TrajectoryDataSet>
247  te::common::TraverseType travType)
248 {
249  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
250  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
251  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
255 
256  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
257 
258  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(
259  info.getObservationDataSetInfo().getDataSetName(), &dt, r, travType));
260 
261  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
262 }
263 
264 std::auto_ptr<te::st::TrajectoryDataSet>
266  const te::dt::DateTime& dt,
268  const te::gm::Envelope& e,
270  te::common::TraverseType travType)
271 {
272  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
273  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
274  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
278 
279  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
280 
281  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(
282  info.getObservationDataSetInfo().getDataSetName(), &e, sr, &dt, tr, travType));
283 
284  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
285 }
286 
287 std::auto_ptr<te::st::TrajectoryDataSet>
291  te::common::TraverseType travType)
292 {
293  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
294  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
295  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
299 
300  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
301 
302  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(
303  info.getObservationDataSetInfo().getDataSetName(), &geom, sr, &dt, tr, travType));
304 
305  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
306 }
307 
309  std::vector<TimeSeriesDataSetInfo>& /*output*/)
310 {
311  return;
312 }
313 
314 std::auto_ptr<te::st::TimeSeriesDataSet>
316  te::common::TraverseType travType)
317 {
318  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
319  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
320  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
324 
325  //get the data set
326  std::auto_ptr<te::da::DataSet> dset(m_ds->getDataSet(info.getObservationDataSetInfo().getDataSetName(), travType));
327 
328  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
329 }
330 
331 std::auto_ptr<te::st::TimeSeriesDataSet>
334  te::common::TraverseType travType)
335 {
336  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
337  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
338  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
342 
343  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
344 
345  std::auto_ptr<te::da::DataSet> dset(inMemDataSource->getDataSet(
346  info.getObservationDataSetInfo().getDataSetName(), &dt, r, travType));
347 
348  return buildDataSet(static_cast<te::stmem::DataSet*>(dset.release()), info);
349 }
350 
351 std::auto_ptr<te::dt::DateTimePeriod>
353 {
354  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
355  if(!m_ds->dataSetExists(info.getDataSetName()))
356  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
357  info.getEndTimePropIdx(), info.getGeomPropIdx());
358 
359  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
360 
361  return inMemDataSource->getTemporalExtent(info.getDataSetName());
362 }
363 
364 std::auto_ptr<te::dt::DateTimePeriod>
366 {
367  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
368  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
369  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
373 
374  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
375 
376  return inMemDataSource->getTemporalExtent(info.getObservationDataSetInfo().getDataSetName());
377 }
378 
379 std::auto_ptr<te::dt::DateTimePeriod>
381 {
382  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
383  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
384  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
388 
389  te::stmem::DataSource* inMemDataSource = static_cast<te::stmem::DataSource*>(m_ds.get());
390 
391  return inMemDataSource->getTemporalExtent(info.getObservationDataSetInfo().getDataSetName());
392 }
393 
396 {
397  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
398  if(!m_ds->dataSetExists(info.getDataSetName()))
399  loadDataSet(info.getDataSourceInfo(), info.getDataSetName(), info.getBeginTimePropIdx(),
400  info.getEndTimePropIdx(), info.getGeomPropIdx());
401 
402  std::auto_ptr<te::gm::Envelope> res(m_ds->getExtent(info.getDataSetName(), info.getGeomPropIdx()));
403  return *res.get();
404 }
405 
408 {
409  //load the DataSet from its origin DataSource and put it into the In-Mem DataSource
410  if(!m_ds->dataSetExists(info.getObservationDataSetInfo().getDataSetName()))
411  loadDataSet(info.getDataSourceInfo(), info.getObservationDataSetInfo().getDataSetName(),
415 
416  std::auto_ptr<te::gm::Envelope> res(m_ds->getExtent(info.getObservationDataSetInfo().getDataSetName(),
418  return *res.get();
419 }
420 
421 //protected
422 void te::st::STDataLoaderFromMemDS::loadDataSet(const te::da::DataSourceInfo& info, const std::string dsname,
423  int begTimePropIdx, int endTimePropIdx, int gmPropIdx)
424 {
425  std::auto_ptr<te::da::DataSet> dset(te::da::GetDataSet(dsname, info.getId()));
426  if(!dset.get())
427  throw Exception("The DataSet was not loaded correctly!");
428 
429  std::auto_ptr<te::da::DataSetType> dsettype(te::da::GetDataSetType(dsname, info.getId()));
430  if(!dsettype.get())
431  throw Exception("The DataSetType was not loaded correctly!");
432 
433  //Before creating a stmem DataSet, we need to put it in a right place to be copied.
434  dset->moveNext();
435  te::stmem::DataSet* inMemdset = new te::stmem::DataSet(dset.get(), begTimePropIdx, endTimePropIdx, gmPropIdx, 0);
436 
437  //Add them into the in-mem data source
438  te::stmem::DataSource* memDS = static_cast<te::stmem::DataSource*>(m_ds.get());
439  memDS->add(dsname, dsettype.release(), inMemdset);
440 }
441 
442 std::auto_ptr<te::st::ObservationDataSet>
444 {
445  //get temporal and spatial extents
446  std::auto_ptr<te::dt::DateTimePeriod> period(ds->getTemporalExtent());
447  te::gm::Envelope ev;
448  if(info.getGeomPropIdx()>=0)
449  {
450  std::auto_ptr<te::gm::Envelope> aux = ds->getExtent(info.getGeomPropIdx());
451  ev = *aux.get();
452  }
453 
454  return std::auto_ptr<ObservationDataSet> (new ObservationDataSet(ds,
455  te::st::GetType(info), period.release(), ev));
456 }
457 
458 std::auto_ptr<te::st::TrajectoryDataSet>
460 {
461  //get temporal and spatial extents
462  std::auto_ptr<te::dt::DateTimePeriod> period(ds->getTemporalExtent());
463  std::auto_ptr<te::gm::Envelope> ev = ds->getExtent(info.getGeomPropIdx());
464 
465  return std::auto_ptr<TrajectoryDataSet> ( new TrajectoryDataSet(ds, te::st::GetType(info),
466  period.release(), *ev.get()));
467 }
468 
469 std::auto_ptr<te::st::TimeSeriesDataSet>
471 {
472  //get temporal and spatial extents
473  std::auto_ptr<te::dt::DateTimePeriod> period(ds->getTemporalExtent());
474 
475  return std::auto_ptr<TimeSeriesDataSet> ( new TimeSeriesDataSet(ds, te::st::GetType(info),
476  period.release()));
477 }
478 
480 {
481 }
482 
483 
484 
static const std::string sm_STMemoryDataSourceId
The global id of the st memory data source.
Definition: Globals.h:51
A class to represent a time series data set.
A class to represent a DataSet that contains observations.
A class that contains infos about a DataSet that contains observations.
This file contains a class responsible for loading spatiotemporal data from a ST in-memory DataSource...
std::auto_ptr< ObservationDataSet > getDataSet(const ObservationDataSetInfo &info, te::common::TraverseType travType=te::common::FORWARDONLY)
It returns a ObservationDataSet, that is, a DataSet that contains observations.
Implements a DataSource that contains In-Memory DataSets indexed by space and time.
Definition: DataSource.h:57
int getGeomPropIdx() const
It returns the index of the property that is a geometry property.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
Definition: Enums.h:76
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contians the time series observations.
void add(const std::string &name, te::da::DataSetType *t, DataSet *d)
It adds a new DataSet and DataSetType into the DataSource.
Definition: DataSource.cpp:179
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:122
void getInfo(const TrajectoryDataSetInfo &input, std::vector< TrajectoryDataSetInfo > &output)
It returns the information about all trajectories that exist in a single DataSet. ...
std::auto_ptr< te::dt::DateTimePeriod > getTemporalExtent(const ObservationDataSetInfo &info)
It returns the temporal extent of the data set with observations.
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contians the trajectory observations.
std::auto_ptr< te::gm::Envelope > getExtent(std::size_t i)
It computes the bounding rectangle for a spatial property of the dataset.
Definition: DataSet.cpp:588
int getGeomPropIdx() const
It returns the indexes of the DataSet properties that contains the geometries associated to the traje...
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo &info)
An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.
Definition: Utils.cpp:46
TraverseType
A dataset can be traversed in two ways:
Definition: Enums.h:53
std::auto_ptr< te::dt::DateTimePeriod > getTemporalExtent(const std::string &name)
It returns the temporal extent associated to a DataSet.
Definition: DataSource.cpp:210
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
int getBeginTimePropIdx() const
It returns the index of the DataSet property that contains the phenomenon beginning time...
TEDATAACCESSEXPORT DataSet * GetDataSet(const std::string &name, const std::string &datasourceId)
Definition: Utils.cpp:210
std::auto_ptr< ObservationDataSet > buildDataSet(te::stmem::DataSet *ds, const ObservationDataSetInfo &info)
It builds an ObservationDataSet from a given DataSet.
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns the information about the DataSource.
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 to represent a trajectory data set.
const std::string & getId() const
Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and ...
Definition: DataSet.h:61
std::auto_ptr< te::dt::DateTimePeriod > getTemporalExtent() const
It returns the temporal extent of the observations.
Definition: DataSet.cpp:376
A class that contains infos about a DataSet that contains observations of one or more time series...
A class that represents a data source component.
std::string getDataSetName() const
It returns the DataSet name.
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
Definition: Utils.cpp:225
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
te::gm::Envelope getSpatialExtent(const ObservationDataSetInfo &info)
It returns the temporal extent of the data set with observations of a coverage series.
void loadDataSet(const te::da::DataSourceInfo &info, const std::string dsname, int begTimePropIdx, int endTimePropIdx, int gmPropIdx)
It loads DataSet from the original DataSource and put it in the In-Memory DataSource.
int getEndTimePropIdx() const
It returns the index of the DataSet property that contains the phenomenon end time.