VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ogrFeatureSet.h
Go to the documentation of this file.
1 
2 
3 
4 
5 #pragma once
6 
9 
10 #include <boost/scoped_ptr.hpp>
11 #include <boost/shared_ptr.hpp>
12 
13 #include <features/featureSet.h>
14 #include <features/feature.h>
15 #include <features/query.h>
16 
18 
19 #include <ogrsf_frmts.h>
20 
21 #include <set>
22 
23 namespace MAKVRinTerra
24 {
26  {
27  public:
28  typedef std::vector<DtFeatureGeometry> GeometryVector;
29 
31  boost::shared_ptr<OGRFeature> feature,
32  DtFeatureGeometry geometry,
33  DtFeature::CPtr defaults);
34 
35  unsigned numberOfAttributes(const Key::String &) const;
36 
37  boost::optional<Attribute> attribute(const Key & k) const;
38 
39  DtFeatureGeometry geometry() const;
40 
41  void forEachAttribute(ForEachFunction) const;
42 
43  DetachCallback addDeleteCallback(const DeleteCallback&) const
44  {
45  return DetachCallback();
46  }
47 
48  bool isDeleted() const
49  {
50  return false;
51  }
52 
53  private:
54  boost::shared_ptr<OGRFeature> myFeature;
57  };
58 
60  {
61  public:
62  typedef boost::shared_ptr<DtOgrDataSource> Ptr;
63 
67  static DtFeatureSet* Make(std::string file, std::string layerName = "");
68 
70  explicit DtOgrDataSource(std::string file, std::string layerName = "");
71 
72  std::string label() const;
73  bool isIndexed() const;
74 
75  protected:
76  std::string myFile;
77  boost::shared_ptr<OGRDataSource> myDataSource;
78  };
79 
81  {
82  public:
84 
85  DtOgrLayer(
86  boost::shared_ptr<OGRDataSource>,
87  int layerNum,
88  bool indexed,
89  const std::string& srcPath,
90  const std::string& configLayerName = "");
91 
92  std::string label() const;
93  void forEachFeatureParallel(const ForEachFunction&) const;
94  DetachCallback forEachFeatureAsync(const ForEachFunction&) const;
95  DtFeatureSet* filter(
96  const DtQuery& query,
97  const boost::optional<DtFeatureGeometry>&,
98  DtLoadType) const;
99  DtFeatureSet* clone() const;
100  bool loaded(double) const;
101  DetachCallback addLoadedCallback(const LoadedCallback&) const;
102  bool elided() const;
103  bool empty() const;
104  bool isIndexed() const;
105 
106  protected:
107  explicit DtOgrLayer(const DtOgrLayer& from);
108  DtOgrLayer(const DtOgrLayer& from, boost::optional<DtFeatureGeometry> filter);
109 
110  typedef std::set<DtFeature::Key> AttributeSet;
111 
112  boost::shared_ptr<OGRDataSource> myDataSource;
114  boost::optional<DtFeatureGeometry> myGeometryFilter;
117  std::string myLayerName;
118  std::string myConfigLayerName;
121  std::string myLabel;
122  };
123 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)