TiePointsLocator.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 #ifndef __TERRALIB_VP_INTERNAL_TIEPOINTSLOCATOR_H
21 #define __TERRALIB_VP_INTERNAL_TIEPOINTSLOCATOR_H
22 
23 #include "Config.h"
24 #include "../dataaccess/dataset/DataSet.h"
25 #include "../dataaccess/dataset/DataSetType.h"
26 
27 #include<tuple>
28 
29 namespace te
30 {
31  namespace vp
32  {
33  /*!
34  \namespace TiePointsLocator A namespace for functions to locate tie-points in vector data.
35  */
36  namespace TiePointsLocator
37  {
38  /*!
39  \typedef TiePointT
40  \brief Tie poit type definition [ SRID1, x1, y2, SRID2, x2, y2 ].
41  */
42  typedef std::tuple< int, double, double, int, double, double > TiePointT;
43 
44  /*!
45  \brief Match geometries creating tie-points for the mathed ones.
46  \param geometries1 Input Geometries 1 vector.
47  \param geometries2 INput Geometries 2 vector.
48  \param enableThreads Enable/disable the use of threads.
49  \param maxXOffset Maximum X offset betweeen Geometries 1 and Geometries 2.
50  \param maxYOffset Maximum Y offset betweeen Geometries 1 and Geometries 2.
51  \param maxPercentDiff Maximum percentual difference betweeen features of Geometries 1 and Geometries 2.
52  \param tiePoints Output tie-points.
53  \return true if ok, false on errors.
54  */
56  const std::vector< te::gm::Geometry const* >& geometries1,
57  const std::vector< te::gm::Geometry const* >& geometries2,
58  const bool enableThreads,
59  const double maxXOffset,
60  const double maxYOffset,
61  const double maxPercentDiff,
62  std::vector< TiePointT >& tiePoints );
63 
64  /*!
65  \brief Match geometries from the given datasets creating tie-points for the mathed ones.
66  \param dataset1 Input dataset 1.
67  \param dsType1 Input dataset type 1.
68  \param dataset2 Input dataset 2.
69  \param dsType2 Input dataset type 2.
70  \param enableThreads Enable/disable the use of threads.
71  \param maxXOffset Maximum X offset betweeen Geometries 1 and Geometries 2.
72  \param maxYOffset Maximum Y offset betweeen Geometries 1 and Geometries 2.
73  \param maxPercentDiff Maximum percentual difference betweeen features of Geometries 1 and Geometries 2.
74  \param tiePoints Output tie-points.
75  \return true if ok, false on errors.
76  */
78  te::da::DataSet& dataset1,
79  const te::da::DataSetType& dsType1,
80  te::da::DataSet& dataset2,
81  const te::da::DataSetType& dsType2,
82  const bool enableThreads,
83  const double maxXOffset,
84  const double maxYOffset,
85  const double maxPercentDiff,
86  std::vector< TiePointT >& tiePoints );
87 
88  } // end namespace TiePointsLocator
89  } // end namespace vp
90 } // end namespace te
91 
92 #endif // __TERRALIB_VP_INTERNAL_TIEPOINTSLOCATOR_H
A class that models the description of a dataset.
Definition: DataSetType.h:73
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
TEVPEXPORT bool MatchDataSets(te::da::DataSet &dataset1, const te::da::DataSetType &dsType1, te::da::DataSet &dataset2, const te::da::DataSetType &dsType2, const bool enableThreads, const double maxXOffset, const double maxYOffset, const double maxPercentDiff, std::vector< TiePointT > &tiePoints)
Match geometries from the given datasets creating tie-points for the mathed ones.
TEVPEXPORT bool MatchGeometries(const std::vector< te::gm::Geometry const * > &geometries1, const std::vector< te::gm::Geometry const * > &geometries2, const bool enableThreads, const double maxXOffset, const double maxYOffset, const double maxPercentDiff, std::vector< TiePointT > &tiePoints)
Match geometries creating tie-points for the mathed ones.
std::tuple< int, double, double, int, double, double > TiePointT
Tie poit type definition [ SRID1, x1, y2, SRID2, x2, y2 ].
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).