OperationService.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 terralin/vp/OperationService.h
22 
23  \brief Represents a service containing useful functions related to an operation
24  */
25 
26 #ifndef __TERRALIB_VP_INTERNAL_OPERATIONSERVICE_H
27 #define __TERRALIB_VP_INTERNAL_OPERATIONSERVICE_H
28 
29 #include "Config.h"
30 
31 #include "../geometry/CommonDataStructures.h"
32 #include "../geometry/Enums.h"
33 #include "../sam/rtree/Index.h"
34 
35 #include <memory>
36 #include <vector>
37 
38 namespace te
39 {
40  namespace gm
41  {
42  class Geometry;
43  class GeometryPtr;
44  }
45 
46  namespace vp
47  {
48  class FeatureSet;
49 
50  using GeometryPair = std::pair<te::gm::GeometryPtr, te::gm::GeometryPtr>;
51 
52  /*!
53  \class OperationService
54 
55  \brief Represents a service containing useful functions related to an operation
56  */
58  {
59  public:
60 
61  //!< No Constructor
62  OperationService() = delete;
63 
64  //!< No Destructor
65  ~OperationService() = delete;
66 
67  //!< Snaps the given featureSets to themselves using the appropriated precison
68  static std::vector<te::vp::FeatureSet> SnapGeometries(const std::vector<te::vp::FeatureSet>& vecInput);
69 
70  //!< Creates an index based on the given featureSet
71  static std::unique_ptr< te::sam::rtree::Index<std::size_t> > CreateIndex(const te::vp::FeatureSet& inputFeatureSet);
72  };
73  } //end namespace vp
74 } //end namespace te
75 
76 
77 #endif // __TERRALIB_VP_INTERNAL_OPERATIONSERVICE_H
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::vp::GeometryPair
std::pair< te::gm::GeometryPtr, te::gm::GeometryPtr > GeometryPair
Definition: OperationService.h:50
te::vp::OperationService::CreateIndex
static std::unique_ptr< te::sam::rtree::Index< std::size_t > > CreateIndex(const te::vp::FeatureSet &inputFeatureSet)
te::vp::OperationService::~OperationService
~OperationService()=delete
Snaps the given featureSets to themselves using the appropriated precison.
te::vp::OperationService::OperationService
OperationService()=delete
< No Constructor
te::vp::OperationService::SnapGeometries
static std::vector< te::vp::FeatureSet > SnapGeometries(const std::vector< te::vp::FeatureSet > &vecInput)
Creates an index based on the given featureSet.
TEVPEXPORT
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::vp::FeatureSet
An alias for a set of Features.
Definition: Feature.h:60
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::vp::OperationService
Represents a service containing useful functions related to an operation.
Definition: OperationService.h:58