1
/************************************************************************************
2
TerraLib - a library for developing GIS applications.
3
Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
5
This code is part of the TerraLib library.
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
You should have received a copy of the GNU Lesser General Public
12
License along with this library.
14
The authors reassure the license terms regarding the warranties.
15
They specifically disclaim any warranties, including, but not limited to,
16
the implied warranties of merchantability and fitness for a particular purpose.
17
The library provided hereunder is on an "as is" basis, and the authors have no
18
obligation to provide maintenance, support, updates, enhancements, or modifications.
19
In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
20
indirect, special, incidental, or consequential damages arising out of the use
21
of this library and its documentation.
22
*************************************************************************************/
24
#include "TeQuerierImpl.h"
25
#include "TeTemporalSeries.h"
28
TeQuerierImpl::TeQuerierImpl(TeQuerierParams& par): params_(par), filledSerie_(false)
31
if(par.chronon()!=TeNOCHRONON) //if there is a chronon, build ts
33
TeGroupingAttr::iterator it = par.groupAttr().begin();
34
if(it!=par.groupAttr().end())
35
ts_ = new TeTemporalSeries(par.theme(), par.objId(), par.chronon(), it->first.name_, it->first.name_, it->second, it->second);
37
ts_ = new TeTemporalSeries(par.chronon(), par.theme());
38
ts_->buildFrameIntervals();
42
TeQuerierImpl::~TeQuerierImpl()
49
TeQuerierImpl::loadTimeFrameInstances(int frame)
54
if(!getTSEntry(ent, frame))
57
return(loadInstances(&ent));
60
return(loadInstances());
64
TeQuerierImpl::getTSEntry(TeTSEntry& tsEntry, int frame)
69
return(ts_->getTSEntry(tsEntry, frame));
73
TeQuerierImpl::getNumTimeFrames()
78
return (ts_->numTimeFrames());
82
TeQuerierImpl::getTS(TeTemporalSeries& ts)
92
TeQuerierImpl::getTSParams()
94
return (ts_->TSparams_);