IExportShape Class Referenceabstract

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

#include "IExportShape.hpp"

+ Inheritance diagram for IExportShape:

Public Member Functions

virtual void setShapeGeometryType (ShapeGeometry type)=0
 set shape geometry type (optional) More...
 
virtual void setSkipUnmatchTypesFlag (bool skipUnmatchTypes)=0
 setting this flag prevents the export of throwing an exception if geometries that do not match the shape geometry type are tried to export
 
virtual void setAttributeMapping (AddInfoLayoutHandle layout, ShapeTableDefinitionHandle dbfTable, int idCounterIdx=-1)=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< int, const char * > *translationMap)=0
 set a translation map between the scop sematic and dbf attribute value More...
 
- Public Member Functions inherited from IExport
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 setBoundingBox (BoxHandle box)=0
 
virtual const char * getFilename () const =0
 Retuns the filename.
 
virtual DataFormat getFileFormat () const =0
 Retuns the file format.
 
virtual void logTo (LogFn logFn)=0
 Set logging call back function.
 
virtual ExportError writeNext (const GeometryHandle &obj)=0
 write next object to the export object
 
virtual void close ()=0
 close open file(s)
 
virtual bool removeFile ()=0
 remove files
 
virtual void setCRS (const char *crs)=0
 set coordinate reference system using a wkt string
 
- Public Member Functions inherited from ObjectBase
virtual void Delete ()
 

Static Public Member Functions

static IExportShapeNew (const char *file, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), const AddInfoLayoutHandle &layout=AddInfoLayoutHandle(), ShapeTableDefinitionHandle dbfTable=ShapeTableDefinitionHandle(), int idCountIdx=-1, int semanticColIdx=-1, unsigned mapSize=0, std::pair< int, const char * > *translationMap=0)
 
- Static Public Member Functions inherited from IExport
static IExportNew (const char *file, DM::DataFormat format=DM::DataFormat::null, const FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, double invalidHeight=DBL_MAX)
 creates new export object More...
 
static IExportNewODM (Handle< IDatamanager > manager, bool preserveFileLayerInfo, const FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, bool cloneAddInfos=true)
 The export object holds a handle to the manager object, securing its life time.
 
static IExportNewODM (std::shared_ptr< IDatamanager > manager, bool preserveFileLayerInfo, const FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, bool cloneAddInfos=true)
 
static IExportNewODM (IDatamanager &manager, bool preserveFileLayerInfo, const FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, unsigned maxBulkPoints=1000, bool cloneAddInfos=true)
 The export only stores a reference to the manager. hence it's the programmers responsiblity to secure its life time.
 
static IExportNewFWF (const char *filename, unsigned versionMajor=1, unsigned versionMinor=0, bool binary=false, const FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, bool append=false, int decimals=3, int coordFieldWidth=12, bool echoWidthIsSigmaOfFit=true)
 Create an full waveform export.
 
static IExportNewSDW (const char *filename, unsigned versionMajor=1, unsigned versionMinor=0, const FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), double invalidHeight=DBL_MAX)
 Create an full waveform export.
 
static IExportNewWinput (const char *filename, bool binary, DM::ColumnSemantic structIdAddInfoCol=DM::ColumnSemantic::null, ExportWinputSeparator separator=ExportWinputSeparator::insertSeparatorCode, FilterHandle filter=FilterHandle(), ControlObjectHandle control=ControlObjectHandle(), bool collectHdrContents=false, bool append=false)
 Create a winput export.
 

Detailed Description

Specific import class for handling shape file imports.

Member Function Documentation

◆ setAttributeMapping()

virtual void setAttributeMapping ( AddInfoLayoutHandle  layout,
ShapeTableDefinitionHandle  dbfTable,
int  idCounterIdx = -1 
)
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]dbfTablesize of the idxMap, which has to be a corresponding C array
[in]idCounterIdxoutput a counter id at the given column index

◆ setSemanticTranslation()

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

set a translation map between the scop sematic and dbf attribute value

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)

◆ setShapeGeometryType()

virtual void setShapeGeometryType ( ShapeGeometry  type)
pure virtual

set shape geometry type (optional)

The shape format only one geometry type. Setting the corresponding type is not necessary, since it is automatically determined based on the first geometry that is exported. Please note that point data are usually exported as pointsets using a default chunk size of 1000 points. To force each point written as a separate object, set type ShapeGeometry::point (or ShapeGeometry::point2d). This allows exporting attributes (within the dbf file) for each point. NOTE: this function must be called before the first object is exported