VR-Forces 4.1 Class Documentation
osgEarthFeatureSet.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <features/feature.h>
4 #include <features/featureSet.h>
5 
6 #include <osgEarth/Map>
7 #include <osgEarthFeatures/FeatureSource>
8 #include <osgEarthSymbology/Query>
9 #include <osgEarth/MapNode>
10 
11 namespace MAKVRinTerra
12 {
14  {
15  public:
16  typedef osg::ref_ptr<osgEarth::Features::Feature> OsgEarthFeaturePtr;
17 
18  static const char* LayerAttribute;
19 
20  DtOsgEarthFeature(OsgEarthFeaturePtr, const DtProj&, std::string layerName);
21 
22  unsigned numberOfAttributes(const Key::String&) const;
23 
24  boost::optional<Attribute> attribute(const Key &) const;
25 
26  DtFeatureGeometry geometry() const;
27 
28  void forEachAttribute(ForEachFunction) const;
29 
30  private:
33  std::string myLayerName;
34  };
35 
37  {
38  public:
39  typedef std::set<DtFeature::Key> AttributeSet;
40 
41  static DtFeatureSet* MakeMap(const osgEarth::Map& map);
42  static DtFeatureSet* MakeWFS(std::string url, std::string layer);
43  static DtFeatureSet* Make(const osgEarth::Features::FeatureSourceOptions &);
44 
45  explicit DtOsgEarthFeatureSet(
46  const osgEarth::Features::FeatureSourceOptions&,
47  const osgEarth::Symbology::Query& = osgEarth::Symbology::Query());
48 
49  void forEachFeature(ForEachFunction, DtWaitType) const;
50  DtFeatureSet* filter(const DtQuery&, DtLoadType) const;
51  DtFeatureSet* clone() const;
52  DtQuery schema() const;
53  bool loaded(double) const;
54 
55  private:
56  DtOsgEarthFeatureSet(const DtOsgEarthFeatureSet&, const osgEarth::Symbology::Query&);
58 
59  osg::ref_ptr<osgEarth::Features::FeatureSource> myFeatureSource;
61  osgEarth::Symbology::Query myQuery;
62  std::string myLayerName;
65  };
66 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)