VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
shapeVectorInitializer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: shapeVectorInit.h,v $ $Revision: 1.13 $ $State: Exp $
7 *******************************************************************************/
8 #ifndef shapeVectorInitializer_H_
9 #define shapeVectorInitializer_H_
10 
11 #include "shape/shapeDefines.h"
13 #include "shape/shapeEntry.h"
14 
15 #include <vlutil/vlConfig.h>
16 #include <vlutil/vlFilename.h>
17 #include <list>
18 
19 // Entries which get stored in myAttributeMappingList
21 {
23  unsigned int attributeType;
25 };
26 
27 
28 // DtShapeVectorInitializer holds the settings specified in a
29 // ShapeVectorMetafileRecord
31 {
32 
33 public:
34 
35  typedef std::list<DtShapeEntry> DtShapeFileContainer;
36  typedef DtShapeFileContainer::iterator DtShapeFileIter;
37  typedef DtShapeFileContainer::const_iterator DtShapeFileConstIter;
38 
39  typedef std::list<DtShapeAttributeMapping> DtShapeAttributeMapContainer;
40  typedef DtShapeAttributeMapContainer::iterator DtShapeAttributeMapIter;
41  typedef DtShapeAttributeMapContainer::const_iterator DtShapeAttributeMapConstIter;
42 
43  // default constructor.
45 
46  // destructor
47  virtual ~DtShapeVectorInitializer();
48 
49  // copy constructor
51 
52  // assignment operator
54 
55  // \return "shape"
56  virtual DtString type();
57 
58  // \return The container of shape entries in this initializer.
59  virtual const DtShapeFileContainer& featureDataFileList() const;
60  virtual DtShapeFileContainer& featureDataFileList();
61 
62  // Add a filename to the load list
63  virtual void addFeatureDataFile(const DtFilename& filename, int fccCode, const DtFilename& path);
64 
65  // \return the origin latitude;
66  virtual const double& originLatitude() const;
67  virtual void setOriginLatitude(const double& d);
68 
69  // \return the origin longitude
70  virtual const double& originLongitude() const;
71  virtual void setOriginLongitude(const double& d);
72 
73  // \return the low-color height
74  virtual bool isOriginSpecified() const;
75  virtual void setIsOriginSpecified(bool b);
76 
77  // Called by DtShapeVectorMetafileRecord::processToken to import the
78  // given fieldName from the dBASE file as an attribute with the given
79  // attributeName and attributeType.
80  virtual void addAttributeMapping(const DtString& attributeName,
81  unsigned int attributeType, const DtString& fieldName);
82 
83  // \return The container of attribute mappings
84  // \see DtShapeAttributeMapping
85  virtual const DtShapeAttributeMapContainer& attributeMap() const;
86  virtual DtShapeAttributeMapContainer& attributeMap();
87 
88  virtual void clearList();
89 
90  // Mapping file (CSV formatted) which maps shape filename fragments
91  // to entries in the DfadSedrisMap file to be used for all features in
92  // that file.
93  // Only used if #myClassifyFeaturesFromFilename is true.
95  virtual void setShapeFilenameMapFile(const DtFilename& filename);
96  virtual DtFilename shapeFilenameMapFile() const;
98 
99  // If true, will attempt to choose DfadSedisMap entries based on
100  // filename, using #myShameFilenameMapFile.
102  virtual void setClassifyFeaturesFromFilename(bool v);
103  virtual bool classifyFeaturesFromFilename() const;
105 
106  // Mapping file (CSV formatted) which lists attribute names to a set
107  // of alternative names that may be found in the .dbf file along with
108  // a shape file. Any occurrences of any of the name aliases will be
109  // imported to the attribute named in this list.
110  // Only used if #myUseAttributeAliasMapping is true.
112  virtual void setShapeAttributeAliasFile(const DtFilename& filename);
113  virtual DtFilename shapeAttributeAliasFile() const;
115 
116  // If true, will map attributes using #myShapeAttributeAliasFile.
118  virtual void setUseAttributeAliasFile(bool v);
119  virtual bool useAttributeAliasFile() const;
121 
122 protected:
123 
126 
129 
134 
138 
139 };
140 
141 #endif
DtShapeFileContainer::iterator DtShapeFileIter
Definition: shapeVectorInitializer.h:36
DtShapeAttributeMapContainer::const_iterator DtShapeAttributeMapConstIter
Definition: shapeVectorInitializer.h:41
double myOriginLatitude
Definition: shapeVectorInitializer.h:130
DtShapeAttributeMapContainer::iterator DtShapeAttributeMapIter
Definition: shapeVectorInitializer.h:40
virtual void clearList()
DtString fieldName
Definition: shapeVectorInitializer.h:24
Definition: vectorDataInitializer.h:21
unsigned int attributeType
Definition: shapeVectorInitializer.h:23
bool myIsOriginSpecified
Definition: shapeVectorInitializer.h:135
bool myUseAttributeAliasMapping
Definition: shapeVectorInitializer.h:137
DtString attributeName
Definition: shapeVectorInitializer.h:22
double myMinimumDistance
Definition: shapeVectorInitializer.h:132
std::list< DtShapeAttributeMapping > DtShapeAttributeMapContainer
Definition: shapeVectorInitializer.h:39
DtFilename myShapeFilenameMapFile
Definition: shapeVectorInitializer.h:127
double myThresholdForSeaLevel
Definition: shapeVectorInitializer.h:133
double myOriginLongitude
Definition: shapeVectorInitializer.h:131
DtShapeFileContainer::const_iterator DtShapeFileConstIter
Definition: shapeVectorInitializer.h:37
Definition: shapeVectorInitializer.h:20
std::list< DtShapeEntry > DtShapeFileContainer
Definition: shapeVectorInitializer.h:35
bool myClassifyFeaturesFromFilename
Definition: shapeVectorInitializer.h:136
DtShapeAttributeMapContainer myAttributeMappingList
Definition: shapeVectorInitializer.h:125
virtual DtString type()=0
DtShapeFileContainer myFeatureDataFileList
Definition: shapeVectorInitializer.h:124
#define DT_DLL_shape
Definition: shapeDefines.h:23
Definition: shapeVectorInitializer.h:30
virtual DtVectorDataInitializer & operator=(const DtVectorDataInitializer &orig)
DtFilename myShapeAttributeAliasFile
Definition: shapeVectorInitializer.h:128

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)