VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtOverlayShapeFileLoadHandler Class Reference

The DtOverlayShapeFileLoadHandler class is the interface to be used when loading a shape file and having the contents either created locally (if not part of a scenario) or in the scenario as published objects. More...

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

Public Member Functions

 DtOverlayShapeFileLoadHandler (makVrv::DtDe &de)
 CTOR.
virtual ~DtOverlayShapeFileLoadHandler ()
 DTOR.
virtual bool importShapeFileOntoOverlay (const std::string &shapefile, const std::string &overlay)
 Imports the shapefile to the specified overlay.
virtual const DtFilename & importFrom () const
 Directory name to import from.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static
DtOverlayShapeFileLoadHandler
instance (makVrv::DtDe &de)
static void registerInstance (makVrv::DtDe &de, DtOverlayShapeFileLoadHandler *)

Protected Member Functions

virtual OGRSFDriver * createOGRDriver (const char *driverName="ESRI Shapefile")
 Create a new driver based on ESRI.
virtual bool importLayer (OGRLayer *, const std::string &, const std::string &shapeFileName)
 Imports the given OGR layer onto the specified overlay layer.
virtual bool importFeature (OGRFeature *, const std::string &, const std::string &shapeFileName)
 Imports the given feture onto the specified overlay layer.
virtual DtEntityType getEntityTypeToCreateFromFeature (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 DtEntityType lineType (OGRFeature *, const std::string &shapeFileName) const
virtual DtEntityType pointType (OGRFeature *, const std::string &shapeFileName) const
virtual DtEntityType areaType (OGRFeature *, const std::string &shapeFileName) const
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.

Protected Attributes

makVrv::DtDemyDe
DtFilename myImportFromDirectory

Detailed Description

The DtOverlayShapeFileLoadHandler class is the interface to be used when loading a shape file and having the contents either created locally (if not part of a scenario) or in the scenario as published objects.

It will load road, area and point features

Constructor & Destructor Documentation

makVrf::DtOverlayShapeFileLoadHandler::DtOverlayShapeFileLoadHandler ( makVrv::DtDe de)

CTOR.

virtual makVrf::DtOverlayShapeFileLoadHandler::~DtOverlayShapeFileLoadHandler ( )
virtual

DTOR.

Member Function Documentation

static DtOverlayShapeFileLoadHandler& makVrf::DtOverlayShapeFileLoadHandler::instance ( makVrv::DtDe de)
static
static void makVrf::DtOverlayShapeFileLoadHandler::registerInstance ( makVrv::DtDe de,
DtOverlayShapeFileLoadHandler  
)
static
virtual bool makVrf::DtOverlayShapeFileLoadHandler::importShapeFileOntoOverlay ( const std::string &  shapefile,
const std::string &  overlay 
)
virtual

Imports the shapefile to the specified overlay.

If no overlay is given the name of the file will be used as the overlay

virtual const DtFilename& makVrf::DtOverlayShapeFileLoadHandler::importFrom ( ) const
virtual

Directory name to import from.

When importing from a shapefile this will be set to that directory

virtual OGRSFDriver* makVrf::DtOverlayShapeFileLoadHandler::createOGRDriver ( const char driverName = "ESRI Shapefile")
protectedvirtual

Create a new driver based on ESRI.

virtual bool makVrf::DtOverlayShapeFileLoadHandler::importLayer ( OGRLayer *  ,
const std::string &  ,
const std::string &  shapeFileName 
)
protectedvirtual

Imports the given OGR layer onto the specified overlay layer.

virtual bool makVrf::DtOverlayShapeFileLoadHandler::importFeature ( OGRFeature *  ,
const std::string &  ,
const std::string &  shapeFileName 
)
protectedvirtual

Imports the given feture onto the specified overlay layer.

virtual DtEntityType makVrf::DtOverlayShapeFileLoadHandler::getEntityTypeToCreateFromFeature ( 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

virtual DtEntityType makVrf::DtOverlayShapeFileLoadHandler::lineType ( OGRFeature *  ,
const std::string &  shapeFileName 
) const
protectedvirtual
virtual DtEntityType makVrf::DtOverlayShapeFileLoadHandler::pointType ( OGRFeature *  ,
const std::string &  shapeFileName 
) const
protectedvirtual
virtual DtEntityType makVrf::DtOverlayShapeFileLoadHandler::areaType ( OGRFeature *  ,
const std::string &  shapeFileName 
) const
protectedvirtual
virtual std::vector<DtVector> makVrf::DtOverlayShapeFileLoadHandler::getFeatureGeometry ( OGRFeature *  ) const
protectedvirtual

Gets feature geometry as local database coordinates.

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

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

Member Data Documentation

makVrv::DtDe& makVrf::DtOverlayShapeFileLoadHandler::myDe
protected
DtFilename makVrf::DtOverlayShapeFileLoadHandler::myImportFromDirectory
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)