VR-Forces 4.2 Class Documentation
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  protected:
39 
40  typedef osgEarth::Features::AttributeTable AttributeTable;
41  typedef std::map<Key::String, AttributeTable::value_type::second_type> StringAttributeTable;
43  };
44 
46  {
47  public:
49 
50  DtFeatureGeometry geometry() const;
51 
52  protected:
54  };
55 
57  {
58  public:
59  typedef std::set<DtFeature::Key> AttributeSet;
60 
61  static DtFeatureSet* MakeMap(const osgEarth::Map& map);
62  static DtFeatureSet* MakeWFS(std::string url, std::string typeName);
63  static DtFeatureSet* Make(const osgEarth::Features::FeatureSourceOptions &);
64 
65  explicit DtOsgEarthFeatureSet(
66  const osgEarth::Features::FeatureSourceOptions&);
67 
68  std::string label() const;
69  void forEachFeature(ForEachFunction, DtWaitType) const;
70  DtFeatureSet* filter(const DtQuery&, DtLoadType) const;
71  DtFeatureSet* clone() const;
72  bool loaded(double) const;
73  bool empty() const;
74 
75  protected:
77  DtOsgEarthFeatureSet(const DtOsgEarthFeatureSet&, boost::optional<DtFeatureGeometry>);
78 
79  osg::ref_ptr<osgEarth::Features::FeatureSource> myFeatureSource;
81  boost::optional<DtFeatureGeometry> myGeometryFilter;
82  osgEarth::Features::Query myQuery;
84  };
85 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)