ToolMap
Loading...
Searching...
No Matches
tmExportDataSHP Class Reference
Inheritance diagram for tmExportDataSHP:
tmExportData

Public Member Functions

 tmExportDataSHP ()
 Constructor.
 
 tmExportDataSHP (DataBaseTM *database)
 Constructor.
 
void Create (DataBaseTM *database)
 Creator.
 
 ~tmExportDataSHP ()
 destructor
 
virtual bool CreateEmptyExportFile (ProjectDefMemoryLayers *myLayer, const wxString &path)
 Create empty file.
 
virtual bool CreatePrjFile (ProjectDefMemoryLayers *myLayer, const wxString &path, PRJDEF_PROJ_TYPE proj)
 
virtual bool AddOptFields (const PrjMemFieldArray &myfields)
 Add optional fields to the Shp.
 
virtual bool AddGenericFields (int iSize)
 Adding generic fields.
 
virtual bool AddFIDField ()
 Adding Field for storing ToolMap FID.
 
virtual void SetFrame (wxRealPoint *points, int nbvertex)
 Set the frame.
 
virtual bool WriteLines (ProjectDefMemoryLayers *myLayer)
 Write all geometrics lines to the shp.
 
virtual bool WritePoints (ProjectDefMemoryLayers *myLayer)
 Write all geometrics points to the shp.
 
virtual bool WritePolygons (ProjectDefMemoryLayers *myLayer)
 Compute polygons from lines.
 
virtual bool WriteLabels (ProjectDefMemoryLayers *myLayer)
 
virtual long WriteConcatGeometries (ProjectDefMemoryLayers *layer, wxProgressDialog *progDlg, tmPercent *percent)
 
virtual bool AddConcatAttributs (ProjectDefMemoryLayers *layer, PrjDefMemManage *projdef, long loop, wxProgressDialog *progDlg, tmPercent *percent)
 
virtual bool SetAttributsBasic (DataBaseResult &results)
 
virtual bool SetAttributsAdvanced (DataBaseResult &results, ProjectDefMemoryLayers *layer)
 
virtual bool GetPolyExportInfo (ProjectDefMemoryLayers *layer, bool usefastexport)
 
virtual bool CreateSpatialIndex (ProjectDefMemoryLayers *layer)
 
virtual bool HasFeatures ()
 
virtual bool DeleteLayer (ProjectDefMemoryLayers *layer, const wxString &path)
 
- Public Member Functions inherited from tmExportData
 tmExportData ()
 Constructor.
 
 tmExportData (DataBaseTM *database)
 Constructor.
 
void Create (DataBaseTM *database)
 Creator.
 
 ~tmExportData ()
 destructor
 
int GetSizeOfObjDesc (int layerindex)
 Getting size of Object Desc column.
 
wxString GetFileExtension ()
 Return extension without the leading dot.
 
void SetExportAttributEnumeration (bool useAttributCode)
 
bool DoExportAttributEnumerationCode ()
 
virtual void SetEmptyLayer ()
 
void SetCropBufferDistance (double value)
 
double GetCropBufferDistance ()
 
void SetOverwrite (bool value)
 
bool DoOverwrite ()
 

Additional Inherited Members

- Protected Member Functions inherited from tmExportData
wxFileName * GetFileName (ProjectDefMemoryLayers *myLayer, const wxString &path)
 Create a file name.
 
wxFileName * GetFileNamePrj (ProjectDefMemoryLayers *myLayer, const wxString &path)
 Create a prj file name.
 
int GetSizeOfEnum (const PrjMemFieldCodedValArray &mCodedVal)
 Get the max size of the items stored into array.
 
bool GetSimpleAttribData (PRJDEF_LAYERS_TYPE layertype, long layerindex)
 Process query for getting simple attributs.
 
bool GetSimpleAttribDataWithSpatial (PRJDEF_LAYERS_TYPE layertype, long layerindex)
 Process query for getting simple attributs and spatial data.
 
bool GetAdvancedAttribution (ProjectDefMemoryLayers *layer)
 Process the query for getting advanced values from database.
 
- Protected Attributes inherited from tmExportData
DataBaseTMm_pDB
 
wxString m_Extension
 
bool m_Overwrite
 
bool m_EmptyLayer
 

Constructor & Destructor Documentation

◆ tmExportDataSHP() [1/2]

tmExportDataSHP::tmExportDataSHP ( )

Constructor.

Use tmExportDataSHP::Create() for two step initialization

Author
Lucien Schreiber (c) CREALP 2008
Date
14 November 2008

◆ tmExportDataSHP() [2/2]

tmExportDataSHP::tmExportDataSHP ( DataBaseTM database)

Constructor.

Parameters
databaseA valid DataBaseTM object (an assert is done in debug mode)
Author
Lucien Schreiber (c) CREALP 2008
Date
14 November 2008

◆ ~tmExportDataSHP()

tmExportDataSHP::~tmExportDataSHP ( )

destructor

Author
Lucien Schreiber (c) CREALP 2008
Date
14 November 2008

Member Function Documentation

◆ AddConcatAttributs()

bool tmExportDataSHP::AddConcatAttributs ( ProjectDefMemoryLayers layer,
PrjDefMemManage projdef,
long  loop,
wxProgressDialog *  progDlg,
tmPercent percent 
)
virtual

Reimplemented from tmExportData.

◆ AddFIDField()

bool tmExportDataSHP::AddFIDField ( )
virtual

Adding Field for storing ToolMap FID.

Add a first field containing ToolMap's FID. This is needed for adding advanced attribution because setting FID doesn't work with Shapefile (GDAL Bug ???). Added field name is TM_OID

Returns
true if field added successfully
Author
Lucien Schreiber (c) CREALP 2009
Date
26 March 2009

Reimplemented from tmExportData.

◆ AddGenericFields()

bool tmExportDataSHP::AddGenericFields ( int  iObjeDescSize)
virtual

Adding generic fields.

Adding field :

  • OBJECT_CD
  • OBJECT_DESC
    Returns
    true if fields added successfully
    Author
    Lucien Schreiber (c) CREALP 2008
    Date
    16 November 2008

Reimplemented from tmExportData.

◆ AddOptFields()

bool tmExportDataSHP::AddOptFields ( const PrjMemFieldArray &  myfields)
virtual

Add optional fields to the Shp.

Parameters
myfieldsarray of fields for this shapefile
Returns
true if fields were added successfully, false otherwise
Author
Lucien Schreiber (c) CREALP 2008
Date
15 November 2008

Reimplemented from tmExportData.

◆ Create()

void tmExportDataSHP::Create ( DataBaseTM database)

Creator.

For two step initialization. In case of use of the default constructor

Parameters
databaseA valid DataBaseTM object (an assert is done in debug mode)
Author
Lucien Schreiber (c) CREALP 2008
Date
14 November 2008

◆ CreateEmptyExportFile()

bool tmExportDataSHP::CreateEmptyExportFile ( ProjectDefMemoryLayers myLayer,
const wxString &  path 
)
virtual

Create empty file.

Create a file ProjectDefMemoryLayers informations, path and extension specified in class

Parameters
myLayercontain the name of the file (without extension) to create
pathpath where we want the file to be created
Returns
true if file created with sucess, false otherwise
Author
Lucien Schreiber (c) CREALP 2008
Date
14 November 2008

Reimplemented from tmExportData.

◆ CreatePrjFile()

bool tmExportDataSHP::CreatePrjFile ( ProjectDefMemoryLayers myLayer,
const wxString &  path,
PRJDEF_PROJ_TYPE  proj 
)
virtual

Reimplemented from tmExportData.

◆ CreateSpatialIndex()

bool tmExportDataSHP::CreateSpatialIndex ( ProjectDefMemoryLayers layer)
virtual

Reimplemented from tmExportData.

◆ DeleteLayer()

bool tmExportDataSHP::DeleteLayer ( ProjectDefMemoryLayers layer,
const wxString &  path 
)
virtual

Reimplemented from tmExportData.

◆ GetPolyExportInfo()

bool tmExportDataSHP::GetPolyExportInfo ( ProjectDefMemoryLayers layer,
bool  usefastexport 
)
virtual

Reimplemented from tmExportData.

◆ HasFeatures()

bool tmExportDataSHP::HasFeatures ( )
virtual

Reimplemented from tmExportData.

◆ SetAttributsAdvanced()

bool tmExportDataSHP::SetAttributsAdvanced ( DataBaseResult results,
ProjectDefMemoryLayers layer 
)
virtual

Reimplemented from tmExportData.

◆ SetAttributsBasic()

bool tmExportDataSHP::SetAttributsBasic ( DataBaseResult results)
virtual

Reimplemented from tmExportData.

◆ SetFrame()

void tmExportDataSHP::SetFrame ( wxRealPoint *  points,
int  nbvertex 
)
virtual

Set the frame.

If the frame already exists, it is destroyed and this new frame is used

Parameters
pointsarray of points creating a polygon
nbvertexnumber of vertex
Author
Lucien Schreiber (c) CREALP 2008
Date
16 November 2008

Reimplemented from tmExportData.

◆ WriteConcatGeometries()

long tmExportDataSHP::WriteConcatGeometries ( ProjectDefMemoryLayers layer,
wxProgressDialog *  progDlg,
tmPercent percent 
)
virtual

Reimplemented from tmExportData.

◆ WriteLabels()

bool tmExportDataSHP::WriteLabels ( ProjectDefMemoryLayers myLayer)
virtual

Reimplemented from tmExportData.

◆ WriteLines()

bool tmExportDataSHP::WriteLines ( ProjectDefMemoryLayers myLayer)
virtual

Write all geometrics lines to the shp.

Parameters
myLayerobject containing info on the actual layer, such as layer_ID or layer_Name
Returns
false if write failled, true otherwise
Author
Lucien Schreiber (c) CREALP 2008
Date
16 November 2008

Reimplemented from tmExportData.

◆ WritePoints()

bool tmExportDataSHP::WritePoints ( ProjectDefMemoryLayers myLayer)
virtual

Write all geometrics points to the shp.

Parameters
myLayerobject containing info on the actual layer, such as layer_ID or layer_Name
Returns
false if write failled, true otherwise
Author
Lucien Schreiber (c) CREALP 2008
Date
16 November 2008

Reimplemented from tmExportData.

◆ WritePolygons()

bool tmExportDataSHP::WritePolygons ( ProjectDefMemoryLayers myLayer)
virtual

Compute polygons from lines.

This function uses GEOS for computing polygon from lines

Parameters
myLayerInformations about the current layer
Returns
true if polygons were created successfully
Author
Lucien Schreiber (c) CREALP 2008
Date
17 November 2008

Reimplemented from tmExportData.


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