Loading...
Searching...
No Matches
GeometricOp.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 GeometricOp.h
22
23 \brief Geometric operation.
24
25 \ingroup vp
26 */
27
28#ifndef __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
29#define __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
30
31//Terralib
32
33#include "../dataaccess/dataset/DataSetType.h"
34#include "../dataaccess/dataset/DataSetTypeConverter.h"
35#include "../dataaccess/datasource/DataSource.h"
36
37#include "Config.h"
38#include "Enums.h"
39
40// STL
41#include <string>
42#include <vector>
43
44namespace te
45{
46 namespace vp
47 {
49 {
50 public:
51
53
54 virtual ~GeometricOp() {}
55
56 virtual bool run() = 0;
57
58 virtual bool paramsAreValid();
59
61 std::string inDsetName,
62 std::unique_ptr<te::da::DataSetTypeConverter> converter);
63
64 void setParams(std::vector<std::string> selectedProps,
65 std::vector<te::vp::GeometricOperation> operations,
67 std::string attribute,
68 int newSRID);
69
70 void setOutput(std::unique_ptr<da::DataSource> outDsrc,
71 std::string dsname);
72
73 std::vector<std::string> GetOutputDSetNames();
74
75 protected:
76
78 bool MultiGeomColumns,
79 int geomOp = -1);
80
82 std::string m_inDsetName;
83 std::unique_ptr<te::da::DataSetTypeConverter> m_converter;
84
85 std::vector<std::string> m_selectedProps;
86 std::vector<te::vp::GeometricOperation> m_operations;
88 std::string m_attribute;
90
91 std::unique_ptr<te::da::DataSource> m_outDsrc;
92 std::string m_outDsetName;
93 std::vector<std::string> m_outDsetNameVec;
94 };
95 }
96}
97#endif // __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
A class that models the description of a dataset.
Definition: DataSetType.h:73
virtual ~GeometricOp()
Definition: GeometricOp.h:54
virtual bool paramsAreValid()
std::vector< std::string > m_outDsetNameVec
Definition: GeometricOp.h:93
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::unique_ptr< te::da::DataSetTypeConverter > converter)
te::da::DataSourcePtr m_inDsrc
Definition: GeometricOp.h:81
std::string m_attribute
Definition: GeometricOp.h:88
te::da::DataSetType * GetDataSetType(te::vp::GeometricOpObjStrategy, bool MultiGeomColumns, int geomOp=-1)
std::vector< te::vp::GeometricOperation > m_operations
Definition: GeometricOp.h:86
std::string m_inDsetName
Definition: GeometricOp.h:82
virtual bool run()=0
void setParams(std::vector< std::string > selectedProps, std::vector< te::vp::GeometricOperation > operations, te::vp::GeometricOpObjStrategy objStrategy, std::string attribute, int newSRID)
std::vector< std::string > GetOutputDSetNames()
std::unique_ptr< te::da::DataSource > m_outDsrc
Definition: GeometricOp.h:91
std::vector< std::string > m_selectedProps
Definition: GeometricOp.h:85
std::unique_ptr< te::da::DataSetTypeConverter > m_converter
Definition: GeometricOp.h:83
std::string m_outDsetName
Definition: GeometricOp.h:92
void setOutput(std::unique_ptr< da::DataSource > outDsrc, std::string dsname)
te::vp::GeometricOpObjStrategy m_objStrategy
Definition: GeometricOp.h:87
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
GeometricOpObjStrategy
Defines the strategy used for the processing of the input geometries.
Definition: Enums.h:116
TerraLib.
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
Proxy configuration file for TerraView (see terraview_config.h).
Enumerations of XML module.