VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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* Make(osg::ref_ptr<osgEarth::Features::FeatureSource> featureSource);
72 
73  explicit DtOsgEarthFeatureSet(osg::ref_ptr<osgEarth::Features::FeatureSource> featureSource);
74 
75  std::string labelWithoutBounds() const;
76  std::string label() const;
77  void forEachFeatureParallel(const ForEachFunction&) const;
78  DetachCallback forEachFeatureAsync(const ForEachFunction&) const;
79  DtFeatureSet* filter(
80  const DtQuery&, const boost::optional<DtFeatureGeometry>&, DtLoadType) const;
81  DtFeatureSet* clone() const;
82  bool loaded(double) const;
83  DetachCallback addLoadedCallback(const LoadedCallback&) const;
84  bool elided() const;
85  bool empty() const;
86  bool isCacheable(const boost::optional<DtFeatureGeometry>& area) const;
87  void cacheEstimate(double& time, double& size, const boost::optional<DtFeatureGeometry>& area) const;
88  void cacheData(
89  const boost::optional<DtFeatureGeometry>& area,
90  DtFeatureCacheProgressCallback* progress) const;
91 
92  protected:
94  DtOsgEarthFeatureSet(const DtOsgEarthFeatureSet&, boost::optional<DtFeatureGeometry>);
95 
96  virtual void convertBoundsQueryToTileQueries(
97  std::list<osgEarth::Features::Query>& output) const;
98  virtual void convertBoundsQueryToTileQueries(
99  const osgEarth::TileKey& root,
100  std::list<osgEarth::Features::Query>& output) const;
101 
102  osg::ref_ptr<osgEarth::Features::FeatureSource> myFeatureSource;
105  boost::optional<DtFeatureGeometry> myGeometryFilter;
106  osgEarth::Features::Query myQuery;
109  bool myUseTFS;
110  int myTFSLod;
111  };
112 }

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)