AddressGeocodingOp.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 AddressGeocodingOp.h
22 
23  \brief Address Geocoding operation.
24 
25  \ingroup vp
26  */
27 
28 #ifndef __TERRALIB_ADDRESSGEOCODING_INTERNAL_ADDRESSGEOCODING_OP_H
29 #define __TERRALIB_ADDRESSGEOCODING_INTERNAL_ADDRESSGEOCODING_OP_H
30 
31 //Terralib
32 
33 #include "../dataaccess/dataset/DataSet.h"
34 #include "../dataaccess/dataset/DataSetType.h"
35 #include "../dataaccess/dataset/ObjectIdSet.h"
36 #include "../dataaccess/datasource/DataSource.h"
37 
38 #include "../datatype/Property.h"
39 
40 #include "../memory/DataSet.h"
41 #include "../statistics/core/Enums.h"
42 
43 #include "Config.h"
44 
45 // STL
46 #include <map>
47 #include <memory>
48 #include <string>
49 #include <vector>
50 
51 namespace te
52 {
53  namespace addressgeocoding
54  {
56  {
57  public:
58 
60 
62 
64  std::string inDsetName,
65  int inSRID,
66  te::da::DataSourcePtr inAddressDsrc,
67  std::string inAddressDsetName);
68 
69  void setParams( std::vector<std::string> associatedProps,
70  std::string streetNumber);
71 
72  void setNumAttributes(std::string initialLeft,
73  std::string finalLeft,
74  std::string initialRight,
75  std::string finalRight);
76 
78  std::string m_outDsetName);
79 
81 
82  bool run();
83 
84  protected:
85 
86  bool save(std::unique_ptr<te::mem::DataSet> result, std::unique_ptr<te::da::DataSetType> outDsetName);
87 
88  std::unique_ptr<te::da::DataSetType> getOutputDataSetType();
89 
91 
92  void getLines(te::gm::Geometry* geom, std::vector<te::gm::LineString*>& lines);
93 
94  void getLines(te::gm::GeometryCollection* gc, std::vector<te::gm::LineString*>& lines);
95 
96  void getLines(te::gm::LineString* l, std::vector<te::gm::LineString*>& lines);
97 
99  std::string m_inDsetName;
100  int m_inSRID;
102  std::string m_inAddressDsetName;
103 
104  std::vector<std::string> m_associatedProps; //!< File attributes.
105  std::string m_streetNumber; //!< File attribute that represents the address number.
106 
107  std::string m_initialLeft;
108  std::string m_finalLeft;
109  std::string m_initialRight;
110  std::string m_finalRight;
111 
113  std::string m_outDsetName;
114  };
115  }
116 }
117 #endif // __TERRALIB_ADDRESSGEOCODING_INTERNAL_ADDRESSGEOCODING_OP_H
te::addressgeocoding::AddressGeocodingOp::getLineString
te::gm::LineString * getLineString(te::gm::Geometry *geom)
te::addressgeocoding::AddressGeocodingOp::setInput
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, int inSRID, te::da::DataSourcePtr inAddressDsrc, std::string inAddressDsetName)
te::addressgeocoding::AddressGeocodingOp::getOutputDataSetType
std::unique_ptr< te::da::DataSetType > getOutputDataSetType()
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::addressgeocoding::AddressGeocodingOp::run
bool run()
te::addressgeocoding::AddressGeocodingOp::m_finalRight
std::string m_finalRight
Definition: AddressGeocodingOp.h:110
te::addressgeocoding::AddressGeocodingOp
Definition: AddressGeocodingOp.h:56
te::addressgeocoding::AddressGeocodingOp::paramsAreValid
bool paramsAreValid()
te::addressgeocoding::AddressGeocodingOp::m_inAddressDsrc
te::da::DataSourcePtr m_inAddressDsrc
Definition: AddressGeocodingOp.h:101
te::addressgeocoding::AddressGeocodingOp::m_inDsetName
std::string m_inDsetName
Definition: AddressGeocodingOp.h:99
te::addressgeocoding::AddressGeocodingOp::setParams
void setParams(std::vector< std::string > associatedProps, std::string streetNumber)
te::addressgeocoding::AddressGeocodingOp::~AddressGeocodingOp
~AddressGeocodingOp()
Definition: AddressGeocodingOp.h:61
te::addressgeocoding::AddressGeocodingOp::getLines
void getLines(te::gm::GeometryCollection *gc, std::vector< te::gm::LineString * > &lines)
te::addressgeocoding::AddressGeocodingOp::m_streetNumber
std::string m_streetNumber
File attribute that represents the address number.
Definition: AddressGeocodingOp.h:105
te::gm::GeometryCollection
It is a collection of other geometric objects.
Definition: GeometryCollection.h:58
te::addressgeocoding::AddressGeocodingOp::m_initialRight
std::string m_initialRight
Definition: AddressGeocodingOp.h:109
te::addressgeocoding::AddressGeocodingOp::AddressGeocodingOp
AddressGeocodingOp()
te::gm::LineString
LineString is a curve with linear interpolation between points.
Definition: LineString.h:65
te::addressgeocoding::AddressGeocodingOp::setNumAttributes
void setNumAttributes(std::string initialLeft, std::string finalLeft, std::string initialRight, std::string finalRight)
te::addressgeocoding::AddressGeocodingOp::getLines
void getLines(te::gm::Geometry *geom, std::vector< te::gm::LineString * > &lines)
te::addressgeocoding::AddressGeocodingOp::m_inAddressDsetName
std::string m_inAddressDsetName
Definition: AddressGeocodingOp.h:102
te::addressgeocoding::AddressGeocodingOp::m_initialLeft
std::string m_initialLeft
Definition: AddressGeocodingOp.h:107
te::addressgeocoding::AddressGeocodingOp::m_outDsetName
std::string m_outDsetName
Definition: AddressGeocodingOp.h:113
te::addressgeocoding::AddressGeocodingOp::getLines
void getLines(te::gm::LineString *l, std::vector< te::gm::LineString * > &lines)
te::addressgeocoding::AddressGeocodingOp::m_outDsrc
te::da::DataSourcePtr m_outDsrc
Definition: AddressGeocodingOp.h:112
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
te::addressgeocoding::AddressGeocodingOp::m_finalLeft
std::string m_finalLeft
Definition: AddressGeocodingOp.h:108
te::addressgeocoding::AddressGeocodingOp::m_associatedProps
std::vector< std::string > m_associatedProps
File attributes.
Definition: AddressGeocodingOp.h:104
te::addressgeocoding::AddressGeocodingOp::m_inDsrc
te::da::DataSourcePtr m_inDsrc
Definition: AddressGeocodingOp.h:98
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
TEADDRESSGEOCODINGEXPORT
#define TEADDRESSGEOCODINGEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::addressgeocoding::AddressGeocodingOp::m_inSRID
int m_inSRID
Definition: AddressGeocodingOp.h:100
te::addressgeocoding::AddressGeocodingOp::setOutput
void setOutput(te::da::DataSourcePtr outDsrc, std::string m_outDsetName)
te::gm::Geometry
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
te::addressgeocoding::AddressGeocodingOp::save
bool save(std::unique_ptr< te::mem::DataSet > result, std::unique_ptr< te::da::DataSetType > outDsetName)