/usr/include/terralib/kernel/TeSTInstance.h is in libterralib-dev 4.3.0+dfsg.2-11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /************************************************************************************
TerraLib - a library for developing GIS applications.
Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
This code is part of the TerraLib library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public
License along with this library.
The authors reassure the license terms regarding the warranties.
They specifically disclaim any warranties, including, but not limited to,
the implied warranties of merchantability and fitness for a particular purpose.
The library provided hereunder is on an "as is" basis, and the authors have no
obligation to provide maintenance, support, updates, enhancements, or modifications.
In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
indirect, special, incidental, or consequential damages arising out of the use
of this library and its documentation.
*************************************************************************************/
/*! \file TeSTInstance.h
\brief This file contains a class called TeSTInstance that represents
an instance in time of a geographical object or element.
*/
#ifndef __TERRALIB_INTERNAL_STINSTANCE_H
#define __TERRALIB_INTERNAL_STINSTANCE_H
#include "TeTimeInterval.h"
#include "TeMultiGeometry.h"
#include "TeBaseSTInstance.h"
#include <string>
#include <map>
#include <vector>
using namespace std;
/*! \class TeSTInstance
\brief A class that represents an instance in a time of a spatial object.
A spatio-temporal instance (STInstance) is composite of an attribute set and geometries
of a spatial element or object that are valid in a specific time. This class
specializes the base class TeBaseSTInstance representing the geometries
as multigeometries (TeMultiGeometry) and the valid time as a time interval (TeTimeInterval).
\sa TeBaseSTInstance TeMultiGeometry TeTimeInterval
*/
class TL_DLL TeSTInstance : public TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>
{
public:
//! Constructor
TeSTInstance() :
TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>()
{ }
//! Deprecated: Constructor
TeSTInstance (const string& object_id, TeProperty& prop);
//! Constructor
TeSTInstance (const string& object_id, vector<string>& prop, TeAttributeList* attList = 0, const int& s = -1) :
TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>(object_id, prop, attList, s)
{ }
//! Constructor
TeSTInstance (const string& object_id, const TeMultiGeometry& geometries,
const TeTimeInterval& time, const int& s = -1) :
TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>(object_id, geometries, time, s)
{ }
//! Constructor
TeSTInstance (const string& object_id, vector<string>& prop, TeAttributeList* attList,
TeMultiGeometry& geometries, int& slice, TeTimeInterval& time ) :
TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>(object_id, prop, attList, geometries, slice, time)
{ }
//! Clear
virtual void clear();
//! Verifies if the its time is valid
virtual bool isTimeValid();
//! Deprecated: Verifies if the instance has polygons
bool hasPolygons();
//! Deprecated: Verifies if the instance has lines
bool hasLines();
//! Deprecated: Verifies if the instance has points
bool hasPoints();
//! Deprecated: Verifies if the instance has cells
bool hasCells();
//! Deprecated: Return true if this has texts
bool hasTexts();
//! Deprecated: Gets a copy of the ST instance polygon set
bool getGeometry(TePolygonSet& result);
//! Deprecated: Gets a copy of the ST instance line set
bool getGeometry(TeLineSet& result);
//! Deprecated: Gets a copy of the ST instance point set
bool getGeometry(TePointSet& result);
//! Deprecated: Gets a copy of the ST instance cell set
bool getGeometry(TeCellSet& result);
//! Deprecated: Gets a copy of the ST instance text set
bool getGeometry(TeTextSet& result);
//! Deprecated: Gets a copy of the ST instance geometry vector
bool getGeometry(vector<TeGeometry*>& result);
//! Deprecated: Gets a copy of the ST instance multi geometry
bool getGeometry(TeMultiGeometry& result);
//! Deprecated: Get a reference to the ST instance polygon geometry
TePolygonSet& getPolygons();
//! Deprecated: Get a reference to the ST instance line geometry
TeLineSet& getLines();
//! Deprecated: Get a reference to the ST instance point geometry
TePointSet& getPoints();
//! Deprecated: Get a reference to the ST instance cell geometry
TeCellSet& getCells();
//! Deprecated: Get a reference to the ST instance text geometry
TeTextSet& getTexts();
//! Deprecated: Sets a polygon set to the instance
void setGeometry(const TePolygonSet& result);
//! Deprecated: Sets a line set to the instance
void setGeometry(const TeLineSet& result);
//! Deprecated: Sets a point set to the instance
void setGeometry(const TePointSet& result);
//! Deprecated: Sets a cell set to the instance
void setGeometry(const TeCellSet& result);
//! Deprecated: Sets a text set to the instance
void setGeometry(const TeTextSet& result);
//! Deprecated: Sets a text set to the instance
void setGeometry(const TeMultiGeometry& result);
//! Deprecated: Adds a polygon to the instance
bool addGeometry(const TePolygon& poly);
//! Deprecated: Adds a line to the instance
bool addGeometry(const TeLine2D& line);
//! Deprecated: Adds a point to the instance
bool addGeometry(const TePoint& point);
//! Deprecated: Adds a cell to the instance
bool addGeometry(const TeCell& cell);
//! Deprecated: Adds a text to the instance
bool addGeometry(const TeText& cell);
//! Returns a centroid of a geometry representation
virtual void centroid(TeCoord2D& centroid, TeGeomRep geomRep=TeGEOMETRYNONE);
//! Returns an area of a geometry representation
virtual void area(double& a, TeGeomRep geomRep=TeGEOMETRYNONE);
//! Deprecated: Returns the valid time
virtual TeTimeInterval timeInterval ()
{ return getTime(); }
//! Deprecated: Sets the valid time interval
virtual void timeInterval (const TeTimeInterval& t)
{ setTime(t); }
//! Returns the initial time (as a string) of the valid time interval
virtual string getInitialDateTime(const string& mask="YYYYsMMsDDsHHsmmsSS")
{ return time_.getInitialDateTime(mask); }
//! Returns the final time (as a string) of the valid time interval
virtual string getFinalDateTime(const string& mask="YYYYsMMsDDsHHsmmsSS")
{ return time_.getFinalDateTime(mask); }
};
//! A spatial temporal element or object (TeSTElement) is composite of a set of spatial temporal instances related to it.
typedef vector<TeSTInstance> TeSTElement;
#endif
|