IImportShape Class Referenceabstract

Specific import class for handling shape file imports. More...

#include "IImportShape.hpp"

+ Inheritance diagram for IImportShape:

Public Member Functions

virtual void setAttributeMapping (AddInfoLayoutHandle layout, unsigned mapSize, std::pair< unsigned, unsigned > *idxMap)=0
 set a mapping between dbf attributes and an add info layout for importing the attribute information as well More...
 
virtual void setAttributeMapping (AddInfoLayoutHandle layout, unsigned mapSize, std::pair< const char *, unsigned > *idxMap)=0
 set a mapping between dbf attributes and an add info layout for importing the attribute information as well More...
 
virtual void setSemanticTranslation (unsigned columnIdx, unsigned mapSize, std::pair< const char *, int > *translationMap)=0
 set a translation map between a dbf attribute and the scop semantic More...
 
virtual void setSemanticTranslation (const char *columnName, unsigned mapSize, std::pair< const char *, int > *translationMap)=0
 set a translation map between a dbf attribute and the scop semantic More...
 
- Public Member Functions inherited from IImport
virtual unsigned serialize (char *representation=0) const =0
 
virtual void setControlObject (ControlObjectHandle control)=0
 
virtual ControlObjectHandle getControlObject () const =0
 
virtual FileHeaderHandle getHeader () const =0
 
virtual void setFilter (FilterHandle filter)=0
 
virtual FilterHandle getFilter () const =0
 
virtual void setPolygonMerging (PolygonMerging mode)=0
 
virtual PolygonMerging getPolygonMerging () const =0
 
virtual const char * getFilename () const =0
 Returns the filename.
 
virtual DataFormat getFileFormat () const =0
 Returns the file format.
 
virtual void logTo (LogFn logFn)=0
 Set logging call back function.
 
virtual bool readHeaderSeparately ()=0
 read the header in advance
 
virtual ImportError readNext (GeometryHandle &obj)=0
 read next object from import object
 
virtual InvalidObjectStatistic getInvalidGeometries () const =0
 get a statistic of invalid geometries (after import)
 
- Public Member Functions inherited from ObjectBase
virtual void Delete ()
 

Static Public Member Functions

static IImportShapeNew (const char *file, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, AddInfoLayoutHandle defaultLayout=AddInfoLayoutHandle())
 
static ShapeTableDefinitionHandle getTableDefinition (const char *file)
 retrieve the table definition of corresponding dbf file
 
- Static Public Member Functions inherited from IImport
static IImportNew (const char *file, DataFormat format, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, AddInfoLayoutHandle defaultLayout=AddInfoLayoutHandle())
 creates new import object More...
 
static IImportNew (void *instance, const char *file, DataFormat format, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, AddInfoLayoutHandle defaultLayout=AddInfoLayoutHandle())
 creates new import object More...
 
static IImportNewODM (Handle< IDatamanager > manager, bool restoreOrder, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000)
 deprecated odm import creation functions (use IImportODM::New instead)
 
static IImportNewODM (IDatamanager &manager, bool restoreOrder, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000)
 deprecated odm import creation functions (use IImportODM::New instead)
 
static IImportNewGDAL (const char *file, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, unsigned bandNumber=1, const char *driver=0)
 
static IImportNewWinput (const char *file, bool binary, ColumnSemantic structIdAddInfoCol=ColumnSemantic::null, ColumnSemantic wnpCodeAddInfoCol=ColumnSemantic::null, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, AddInfoLayoutHandle layout=AddInfoLayoutHandle())
 
static IImportunserialize (const char *representation, unsigned repSize)
 Restore an import object from its string representation. Since the representation may contain null bytes, its size must also be specified.
 

Detailed Description

Specific import class for handling shape file imports.

Member Function Documentation

◆ setAttributeMapping() [1/2]

virtual void setAttributeMapping ( AddInfoLayoutHandle  layout,
unsigned  mapSize,
std::pair< const char *, unsigned > *  idxMap 
)
pure virtual

set a mapping between dbf attributes and an add info layout for importing the attribute information as well

This is optional import definition must be set before the first element (and file header) is read. If nothing is set no dbf attributes will be imported.

Parameters
[in]layoutlayout that should be attached to each geometry object
[in]mapSizesize of the idxMap, which has to be a corresponding C array
[in]idxMapC array mapping the dbf attribute name (first value of std::pair) to the add info layout index (second value of std::pair)

◆ setAttributeMapping() [2/2]

virtual void setAttributeMapping ( AddInfoLayoutHandle  layout,
unsigned  mapSize,
std::pair< unsigned, unsigned > *  idxMap 
)
pure virtual

set a mapping between dbf attributes and an add info layout for importing the attribute information as well

This is optional import definition must be set before the first element (and file header) is read. If nothing is set no dbf attributes will be imported.

Parameters
[in]layoutlayout that should be attached to each geometry object
[in]mapSizesize of the idxMap, which has to be a corresponding C array
[in]idxMapC array mapping the dbf attribute index (first value of std::pair) to the add info layout index (second value of std::pair)

◆ setSemanticTranslation() [1/2]

virtual void setSemanticTranslation ( const char *  columnName,
unsigned  mapSize,
std::pair< const char *, int > *  translationMap 
)
pure virtual

set a translation map between a dbf attribute and the scop semantic

This is optional import definition must be set before the first element (and file header) is read.

Parameters
[in]columnNamedbf attribute name to be used
[in]mapSizesize of the idxMap, which has to be a corresponding C array
[in]translationMapC array mapping string values (first value of std::pair) to the scop semantic (second value of std::pair)

◆ setSemanticTranslation() [2/2]

virtual void setSemanticTranslation ( unsigned  columnIdx,
unsigned  mapSize,
std::pair< const char *, int > *  translationMap 
)
pure virtual

set a translation map between a dbf attribute and the scop semantic

This is optional import definition must be set before the first element (and file header) is read.

Parameters
[in]columnIdxindex of the dbf attribute to be used
[in]mapSizesize of the idxMap, which has to be a corresponding C array
[in]translationMapC array mapping string values (first value of std::pair) to the scop semantic (second value of std::pair)