VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
propShapefileCreateHandler.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2018 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #pragma once
7 
8 #include <vrvUtil/signalslib.h>
11 #include <vlutil/vlFilename.h>
12 
13 #include <map>
14 #include <string>
15 
16 namespace makVrv
17 {
18  class DtDe;
19  class DtUnicode;
20 }
21 
22 namespace makArchives
23 {
24  class DtPropRecord;
25  class DtTerrainRecord;
26  class DtPropSettingsRecord;
27 }
28 
29 class OGRLayer;
30 class GDALDriver;
31 class GDALDataset;
32 
33 namespace makVrf
34 {
37  {
38  public:
41 
44 
45  static DtPropShapefileCreateHandler& instance(makVrv::DtDe& de);
46  static void registerInstance(makVrv::DtDe& de, DtPropShapefileCreateHandler*);
47 
50  virtual const DtFilename& exportTo() const;
51  virtual void setExportToDirectory(const DtFilename&);
52 
54  virtual const DtFilename& propInformationFilename() const;
55  virtual void setPropInformationFilename(const DtFilename&);
56 
59  virtual bool exportPropsToShapefile(const std::string&, makVrv::DtUnicode& sError, DtString& filesCreated) const;
60 
61  protected:
62  typedef struct PropInformation
63  {
64  double length;
65  double width;
66  double height;
67  int fidCode;
69 
70  typedef std::map<std::string, PropInformation> PropInformationMap;
71 
72  virtual PropInformationMap readPropInformation(const DtFilename&) const;
73 
74  virtual void addPropRecords(const std::vector<makArchives::DtPropRecord>& propRecords, OGRLayer* poLayer,
75  const PropInformationMap& propInformationMap, const DtFilename& dataRoot, bool forSpeedTree) const;
76 
77  virtual DtFilename modelDefinitionFilename(const std::string& modelDefinition, const DtFilename& dataRoot,
78  bool& isSpeedtree) const;
79 
80  virtual bool createBuildingsShapefile(const makArchives::DtTerrainRecord&, const PropInformationMap&, const DtFilename& relativePath,
81  GDALDriver*, const DtFilename&, makVrv::DtUnicode& sError, bool& haveSome) const;
82  virtual bool createSpeedTreeShapefile(const makArchives::DtTerrainRecord&, const PropInformationMap&, const DtFilename& relativePath,
83  GDALDriver*, const DtFilename&, makVrv::DtUnicode& sError, bool& haveSome) const;
84  virtual void removeSourceFiles(const DtFilename&, const std::string& type) const;
85 
86  virtual GDALDataset* createDataSource(GDALDriver*, const DtFilename&, const std::string& type, makVrv::DtUnicode& sError) const;
87  virtual OGRLayer* createLayer(GDALDataset*, bool forSpeedTree, makVrv::DtUnicode& sError) const;
88 
89  virtual bool hasBuildings(const makArchives::DtTerrainRecord& terrainRecord, const DtFilename&) const;
90  virtual bool hasSpeedTrees(const makArchives::DtTerrainRecord& terrainRecord, const DtFilename&) const;
91 
92  virtual bool hasBuildings(const makArchives::DtPropSettingsRecord& records, const DtFilename& dataRoot) const;
93  virtual bool hasSpeedTrees(const makArchives::DtPropSettingsRecord& records, const DtFilename& dataRoot) const;
94 
95  protected:
96  DtFilename myExportToDirectory;
99  };
100 }
Virtual base class.
Definition: DtVirtualBaseClass.h:22
A unicode string.
Definition: DtUnicode.h:33
int fidCode
Definition: propShapefileCreateHandler.h:67
Handler for looking at all the props in the system and translating them into shapefile point features...
Definition: propShapefileCreateHandler.h:36
DtFilename myExportToDirectory
Definition: propShapefileCreateHandler.h:96
DtFilename myPropInformationFilename
Definition: propShapefileCreateHandler.h:97
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
double width
Definition: propShapefileCreateHandler.h:65
A DtPropSettingsRecord contains the information to restore settings for all scene props...
Definition: DtPropSettingsRecord.h:23
Contains makVrv::DtVirtualBaseClass class.
Record of a VR-Vantage terrain Contains: Terrain coordinate system Terrain patches Feature layers Ter...
Definition: DtTerrainRecord.h:29
Definition: propShapefileCreateHandler.h:62
makVrv::DtDe & myDe
Definition: propShapefileCreateHandler.h:98
double length
Definition: propShapefileCreateHandler.h:64
std::map< std::string, PropInformation > PropInformationMap
Definition: propShapefileCreateHandler.h:70
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
double height
Definition: propShapefileCreateHandler.h:66

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)