VR-Forces 4.6.1 Class Documentation
 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. More...

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

Classes

struct  FeatureStyle

Public Member Functions

 DtOGRReader (makVrv::DtDe &de, const std::string &gdalDriver)
 CTOR defines which GDAL driver to use.
virtual ~DtOGRReader ()
virtual std::vector
< DtDataFileCreationData
loadDataFile (const std::string &file, const std::string &defaultOverlay="") const
 Returns a list of environmental objects to create.
- Public Member Functions inherited from makVrf::DtDataFileReader
 DtDataFileReader (makVrv::DtDe &)

Protected Member Functions

virtual OGRSFDriver * createOGRDriver (const char *driverName="ESRI Shapefile") const
 Create a new driver based on ESRI.
virtual bool importLayer (OGRDataSource *dataSource, OGRLayer *, const std::string &, const std::string &shapeFileName, std::vector< DtDataFileCreationData > &importedData) const
 Imports the given OGR layer onto the specified overlay layer.
virtual DtDataFileCreationData importFeature (OGRDataSource *dataSource, OGRLayer *, OGRFeature *, const std::string &, const std::string &shapeFileName) const
 Imports the given feture onto the specified overlay layer.
virtual int getForceFromFeature (OGRDataSource *dataSource, OGRLayer *, OGRFeature *, const std::string &) const
 Calls down to creator to get the force from the feature.
virtual DtEntityType getEntityTypeToCreateFromFeature (OGRDataSource *dataSource, OGRLayer *layer, OGRFeature *, const std::string &shapeFileName) const
 Looks to see if there are at least 3 fields, and the third field is ENTITTYPE and a string.
virtual int geometryType (OGRGeometry *) const
 Given the geometry, return the type.
virtual std::vector< DtVectorgetFeatureGeometry (OGRFeature *) const
 Gets feature geometry as local database coordinates.
virtual DtVector convertPointToLocal (OGRPoint *) const
virtual std::string nameFromFeature (OGRFeature *, const std::string &shapeFileName) const
 If this has a NAME field in the first field, return that.
virtual FeatureStyle getStyleForFeature (OGRDataSource *dataSource, OGRLayer *, OGRFeature *) const
 Gets the color (ARGB) of the feature for the pen (outline or line)

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

Detailed Description

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

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 OGRSFDriver* makVrf::DtOGRReader::createOGRDriver ( const char driverName = "ESRI Shapefile") const
protectedvirtual

Create a new driver based on ESRI.

virtual bool makVrf::DtOGRReader::importLayer ( OGRDataSource *  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 ( OGRDataSource *  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 ( OGRDataSource *  dataSource,
OGRLayer *  ,
OGRFeature *  ,
const std::string &   
) const
protectedvirtual

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

virtual DtEntityType makVrf::DtOGRReader::getEntityTypeToCreateFromFeature ( OGRDataSource *  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 std::vector<DtVector> makVrf::DtOGRReader::getFeatureGeometry ( OGRFeature *  ) const
protectedvirtual

Gets feature geometry as local database coordinates.

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 ( OGRDataSource *  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 Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)