VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osgEarthFeatureSet.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include <features/feature.h>
9 #include <features/featureSet.h>
10 
11 #include <osgEarth/Map>
12 #include <osgEarthFeatures/FeatureSource>
13 #include <osgEarthSymbology/Query>
14 #include <osgEarth/MapNode>
15 
16 namespace MAKVRinTerra
17 {
19  {
20  public:
21  typedef osg::ref_ptr<osgEarth::Features::Feature> OsgEarthFeaturePtr;
22 
23  static DtFeatureGeometry::GeometryVector ConvertGeometry(
24  const osgEarth::Symbology::Geometry* geom, const DtProj& proj);
25 
27 
28  unsigned numberOfAttributes(const Key::String&) const;
29 
30  boost::optional<Attribute> attribute(const Key &) const;
31 
32  DtFeatureGeometry geometry() const;
33 
34  void forEachAttribute(ForEachFunction) const;
35 
36  DetachCallback addDeleteCallback(const DeleteCallback&) const
37  {
38  return DetachCallback();
39  }
40 
41  bool isDeleted() const
42  {
43  return false;
44  }
45 
46  protected:
49 
50  typedef osgEarth::Features::AttributeTable AttributeTable;
51  typedef std::map<Key::String, AttributeTable::value_type::second_type> StringAttributeTable;
53  };
54 
56  {
57  public:
59 
60  DtFeatureGeometry geometry() const;
61 
62  protected:
64  };
65 
67  {
68  public:
69  typedef std::set<DtFeature::Key> AttributeSet;
70 
71  static DtFeatureSet* MakeMap(const osgEarth::Map& map);
72  static DtFeatureSet* MakeWFS(std::string url, std::string typeName);
73  static DtFeatureSet* Make(
74  const osgEarth::Features::FeatureSourceOptions &,
75  const osgDB::Options* dboptions = 0);
76 
77  explicit DtOsgEarthFeatureSet(
78  const osgEarth::Features::FeatureSourceOptions&,
79  const osgDB::Options* dboptions = 0);
80 
81  std::string label() const;
82  void forEachFeatureParallel(const ForEachFunction&) const;
83  DetachCallback forEachFeatureAsync(const ForEachFunction&) const;
84  DtFeatureSet* filter(
85  const DtQuery&, const boost::optional<DtFeatureGeometry>&, DtLoadType) const;
86  DtFeatureSet* clone() const;
87  bool loaded(double) const;
88  DetachCallback addLoadedCallback(const LoadedCallback&) const;
89  bool empty() const;
90 
91  protected:
93  DtOsgEarthFeatureSet(const DtOsgEarthFeatureSet&, boost::optional<DtFeatureGeometry>);
94 
95  osg::ref_ptr<osgEarth::Features::FeatureSource> myFeatureSource;
97  boost::optional<DtFeatureGeometry> myGeometryFilter;
98  osgEarth::Features::Query myQuery;
100  };
101 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)