VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
makVrf::DtOGRReader Class Reference

Base OGR Reader class that will use GDAL and OGR to parse file.

Inheritance diagram for makVrf::DtOGRReader:
Inheritance graph
[legend]

Classes

struct  FeatureStyle
 

Public Member Functions

 DtOGRReader (makVrv::DtDe &de, const std::string &gdalDriver)
 
virtual ~DtOGRReader ()
 
virtual std::vector
< DtDataFileCreationData
loadDataFile (const std::string &file, const std::string &defaultOverlay="") const
 
virtual std::vector< DtVectorgetFeatureGeometry (OGRFeature *) const
 
- Public Member Functions inherited from makVrf::DtDataFileReader
 DtDataFileReader (makVrv::DtDe &)
 

Protected Member Functions

virtual bool importLayer (GDALDataset *dataSource, OGRLayer *, const std::string &, const std::string &shapeFileName, std::vector< DtDataFileCreationData > &importedData) const
 
virtual DtDataFileCreationData importFeature (GDALDataset *dataSource, OGRLayer *, OGRFeature *, const std::string &, const std::string &shapeFileName) const
 
virtual int getForceFromFeature (GDALDataset *dataSource, OGRLayer *, OGRFeature *, const std::string &) const
 
virtual DtEntityType getEntityTypeToCreateFromFeature (GDALDataset *dataSource, OGRLayer *layer, OGRFeature *, const std::string &shapeFileName) const
 
virtual int geometryType (OGRGeometry *) const
 
virtual DtVector convertPointToLocal (OGRPoint *) const
 
virtual std::string nameFromFeature (OGRFeature *, const std::string &shapeFileName) const
 
virtual FeatureStyle getStyleForFeature (GDALDataset *dataSource, OGRLayer *, OGRFeature *) const
 

Static Protected Member Functions

static void GDALErrorHandler (int eclass, int code, const char *msg)
 

Protected Attributes

std::string myGDALDriver
 
- Protected Attributes inherited from makVrf::DtDataFileReader
makVrv::DtDemyDe
 

Constructor & Destructor Documentation

makVrf::DtOGRReader::DtOGRReader ( makVrv::DtDe de,
const std::string &  gdalDriver 
)

CTOR defines which GDAL driver to use.

virtual makVrf::DtOGRReader::~DtOGRReader ( )
virtual

Member Function Documentation

virtual std::vector<DtDataFileCreationData> makVrf::DtOGRReader::loadDataFile ( const std::string &  file,
const std::string &  defaultOverlay = "" 
) const
virtual

Returns a list of environmental objects to create.

Implements makVrf::DtDataFileReader.

virtual std::vector<DtVector> makVrf::DtOGRReader::getFeatureGeometry ( OGRFeature *  ) const
virtual

Gets feature geometry as local database coordinates.

virtual bool makVrf::DtOGRReader::importLayer ( GDALDataset *  dataSource,
OGRLayer *  ,
const std::string &  ,
const std::string &  shapeFileName,
std::vector< DtDataFileCreationData > &  importedData 
) const
protectedvirtual

Imports the given OGR layer onto the specified overlay layer.

virtual DtDataFileCreationData makVrf::DtOGRReader::importFeature ( GDALDataset *  dataSource,
OGRLayer *  ,
OGRFeature *  ,
const std::string &  ,
const std::string &  shapeFileName 
) const
protectedvirtual

Imports the given feture onto the specified overlay layer.

virtual int makVrf::DtOGRReader::getForceFromFeature ( GDALDataset *  dataSource,
OGRLayer *  ,
OGRFeature *  ,
const std::string &   
) const
protectedvirtual

Calls down to creator to get the force from the feature.

virtual DtEntityType makVrf::DtOGRReader::getEntityTypeToCreateFromFeature ( GDALDataset *  dataSource,
OGRLayer *  layer,
OGRFeature *  ,
const std::string &  shapeFileName 
) const
protectedvirtual

Looks to see if there are at least 3 fields, and the third field is ENTITTYPE and a string. If it is then gets the entity type to create from there. If not creates a waypoint if the feature is a point type, an area if a polygon type and route if line type. Calls down to creator to get the actual type.

virtual int makVrf::DtOGRReader::geometryType ( OGRGeometry *  ) const
protectedvirtual

Given the geometry, return the type.

virtual DtVector makVrf::DtOGRReader::convertPointToLocal ( OGRPoint *  ) const
protectedvirtual
virtual std::string makVrf::DtOGRReader::nameFromFeature ( OGRFeature *  ,
const std::string &  shapeFileName 
) const
protectedvirtual

If this has a NAME field in the first field, return that.

virtual FeatureStyle makVrf::DtOGRReader::getStyleForFeature ( GDALDataset *  dataSource,
OGRLayer *  ,
OGRFeature *   
) const
protectedvirtual

Gets the color (ARGB) of the feature for the pen (outline or line)

static void makVrf::DtOGRReader::GDALErrorHandler ( int  eclass,
int  code,
const char msg 
)
staticprotected

Member Data Documentation

std::string makVrf::DtOGRReader::myGDALDriver
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)