VR-Forces 4.0.4 Class Documentation
include/shape/shapeFeatureFile.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: shapeFeatureFile.h,v $ $Revision: 1.17 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #ifndef SHAPEFEATUREFILE_H
00010 #define SHAPEFEATUREFILE_H
00011 
00012 #include "shape/shapeDefines.h"
00013 #include "shape/shapefile.h"
00014 #include "shape/shapeVectorInit.h"
00015 #include <vlutil/vlFilename.h>
00016 #include "gdb/specification.h"
00017 #include "gdb/specMgr.h"
00018 
00019 class DtShapeReader;
00020 class DtShapeVectorInitializer;
00021 class DtGroup;
00022 
00026 class DT_DLL_shape DtShapeFeatureFile : public DtShapefile
00027 {
00028 
00029 public:
00030 
00031    enum DtFeatureTypes
00032    {
00033       PointFeature,
00034       LinearFeature,
00035       ArealFeature
00036 
00037    };
00038 
00040    DtShapeFeatureFile(const DtShapeVectorInitializer* i);
00041 
00043    virtual ~DtShapeFeatureFile();
00044 
00046    virtual DtGroup* import(DtShapeReader* reader);
00047 
00050    virtual bool importFeatures(DtShapeVectorReader* reader);
00051 
00052 protected:
00053 
00057    virtual bool initSpecification(int fccCode, DtSpecification& spec, 
00058       DtSpecificationID& specID, DtFeatureTypes featureType);
00059 
00061    virtual bool createNewSpecification(int fccCode, DtSpecification& spec, 
00062       DtSpecificationID& specID, DtFeatureTypes featureType);
00063 
00067    // to the fieldNamesRead parameter list supplied by the caller.
00068    virtual void readMappedFeatureAttributes(DtSpecification& spec, 
00069       DtSpecificationID& specID, int recordNumber, 
00070       const DtShapeVectorInitializer::DtShapeAttributeMapContainer& attributeMap,
00071       std::list<DtString>& fieldNamesRead);
00072 
00073    // Attempts to read the specified field.  If successful, adds it to the
00074    // specification using the attribute name supplied.
00075    // \return True if successful.
00076    virtual bool readSingleFeatureAttribute(DtSpecification& spec,
00077       int recordNumber, unsigned int attributeType, const DtString& fieldName,
00078       const DtString& attributeName);
00079 
00081    // Any field with a name included in the fieldsToExclude list will
00082    // not be added by this function.
00083    virtual void readAllFeatureAttributes(DtSpecification& spec, 
00084       DtSpecificationID& specID, int recordNumber,
00085       const std::list<DtString>& fieldsToExclude);
00086 
00087    // Uses myFilename and the shapeFilenameMapping file in myEntry to choose
00088    // an FCC code based on the filename.
00089    virtual int findFccCodeFromFilename();
00090 
00091    // Loads the shapeAttributeAliasMap file specified by the initializer.
00092    // Adds all entries to the specified attributeMap.
00093    // \return True if the file was found and loaded.
00094    virtual bool loadShapeAttributeAliasMap(DtShapeVectorInitializer::DtShapeAttributeMapContainer& attributeMap);
00095 };
00096 
00097 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)