VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shapeFeatureFile.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #ifndef SHAPEFEATUREFILE_H
7 #define SHAPEFEATUREFILE_H
8 
9 #include "shape/shapeDefines.h"
10 #include "shape/shapefile.h"
12 #include <vlutil/vlFilename.h>
13 #include "gdb/specification.h"
15 
16 class DtShapeReader;
18 class DtGroup;
19 
24 {
25 
26 public:
27 
29  {
33 
34  };
35 
38 
40  virtual ~DtShapeFeatureFile();
41 
43  virtual DtGroup* import(DtShapeReader* reader);
44 
47  virtual bool importFeatures(DtShapeVectorReader* reader);
48 
49 protected:
50 
54  virtual bool initSpecification(int& fccCode, DtSpecification& spec,
55  DtSpecificationID& specID, DtFeatureTypes featureType, int recordNumber,
57 
59  virtual bool createNewSpecification(const DtFilename& specificationFilename, int fccCode, DtSpecification& spec,
60  DtSpecificationID& specID, DtFeatureTypes featureType, bool warn = true);
61 
65  // to the fieldNamesRead parameter list supplied by the caller.
66  virtual void readMappedFeatureAttributes(DtSpecification& spec,
67  DtSpecificationID& specID, int recordNumber,
69  std::list<DtString>& fieldNamesRead);
70 
71  // Attempts to read the specified field. If successful, adds it to the
72  // specification using the attribute name supplied.
73  // \return True if successful.
74  virtual bool readSingleFeatureAttribute(DtSpecification& spec,
75  int recordNumber, unsigned int attributeType, const DtString& fieldName,
76  const DtString& attributeName);
77 
79  // Any field with a name included in the fieldsToExclude list will
80  // not be added by this function.
81  virtual void readAllFeatureAttributes(DtSpecification& spec,
82  DtSpecificationID& specID, int recordNumber,
83  const std::list<DtString>& fieldsToExclude);
84 
85  // Uses myFilename and the shapeFilenameMapping file in myEntry to choose
86  // an FCC code based on the filename.
87  virtual int findFccCodeFromFilename();
88 
89  // Loads the shapeAttributeAliasMap file specified by the initializer.
90  // Adds all entries to the specified attributeMap.
91  // \return True if the file was found and loaded.
92  virtual bool loadShapeAttributeAliasMap(DtShapeVectorInitializer::DtShapeAttributeMapContainer& attributeMap);
93 };
94 
95 #endif

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)