19#ifndef _TM_GISDATAVECTOR_MYSQL_H_
20#define _TM_GISDATAVECTOR_MYSQL_H_
30#include "../database/database_tm.h"
31#include "tmgisdatavector.h"
35const wxString tmGISMYSQL_FIELD1 = _T(
"OBJECT_ID");
36const wxString tmGISMYSQL_FIELD2 = _T(
"OBJECT_GEOMETRY");
39const wxString tmGISMYSQL_TEXT_TYPES[] = {_T(
"linestring"), _T(
"multipoint"), _T(
"polygon")};
52 bool CheckGeometryFields(
const wxString& tablename);
55 OGRGeometry* CreateDataBaseGeometry(MYSQL_ROW& row,
const tmArrayULong& row_lengths,
int geometry_col = 0);
57 long GetOid(MYSQL_ROW& row,
const int& col);
59 virtual wxString GetTableName(TOC_GENERIC_NAME type);
67 static void SetDataBaseHandle(
DataBaseTM* db) {
80 virtual bool Open(
const wxString& filename,
bool bReadWrite = FALSE);
82 virtual tmRealRect GetMinimalBoundingRectangle();
89 virtual wxRealPoint* GetNextDataLine(
int& nbvertex,
long& oid,
bool& isOver);
91 virtual wxRealPoint* GetNextDataPoint(
long& oid,
bool& isOver);
93 OGRPoint* GetNextDataPointWithAttrib(
long& oid, wxArrayString& values);
95 virtual OGRLineString* GetNextDataLine(
long& oid);
97 virtual OGRPoint* GetOGRNextDataPoint(
long& oid);
101 virtual long AddGeometry(OGRGeometry* Geom,
const long& oid,
int layertype = wxNOT_FOUND);
107 virtual OGRGeometry* GetNextGeometry(
bool restart,
long& oid);
116 virtual int GetFieldsCount();
118 virtual bool GetFieldsName(wxArrayString& Fields,
long oid = wxNOT_FOUND);
120 virtual bool GetFieldsValue(wxArrayString& values,
long oid);
132 virtual bool GetSnapCoord(
const wxRealPoint& clickpt,
double buffersize, wxArrayRealPoints& snapppts,
int snaptype);
134 virtual bool IsPointSnapped(
const wxRealPoint& point,
int snaptype,
long excludeoid = wxNOT_FOUND);
Definition database_tm.h:80
Definition prjdefmemmanage.h:54
Class for attributing data.
Definition tmattributiondata.h:43
Definition tmgisdatavectormysql.h:41
virtual wxArrayLong * GetAllData()
Get All OID back from the MySQL layer.
Definition tmgisdatavectormysql.cpp:752
virtual bool SetSpatialFilter(tmRealRect filter, int type)
Set a spatial filter for geometric data.
Definition tmgisdatavectormysql.cpp:180
virtual int GetCount()
Getting number of features.
Definition tmgisdatavectormysql.cpp:445
virtual wxString GetDataSizeAsHtml(int iPrecision=2)
Getting Database size.
Definition tmgisdatavectormysql.cpp:467
virtual OGRFeature * GetFeatureByOID(long oid)
Get the geometry for specified oid.
Definition tmgisdatavectormysql.cpp:939
long GetOid(MYSQL_ROW &row, const int &col)
Get object ID from MYSQL row results.
Definition tmgisdatavectormysql.cpp:163
virtual wxArrayLong * SearchIntersectingGeometry(OGRGeometry *intersectinggeom)
Search data for intersection.
Definition tmgisdatavectormysql.cpp:778
virtual bool GetSnapCoord(const wxRealPoint &clickpt, double buffersize, wxArrayRealPoints &snapppts, int snaptype)
Get snapping coordinate.
Definition tmgisdatavectormysql.cpp:838
virtual bool Open(const wxString &filename, bool bReadWrite=FALSE)
Generic open code.
Definition tmgisdatavectormysql.cpp:66
virtual wxArrayLong * SearchData(const tmRealRect &rect, int type)
Search spatial data.
Definition tmgisdatavectormysql.cpp:705
virtual wxString GetMetaDataAsHtml()
Get Metadata information well formated.
Definition tmgisdatavectormysql.cpp:419
virtual bool UpdateGeometry(OGRGeometry *geom, const long &oid)
Update the geometry for specified OID.
Definition tmgisdatavectormysql.cpp:1060
virtual TM_GIS_SPATIAL_TYPES GetSpatialType()
Getting Data Spatial type.
Definition tmgisdatavectormysql.cpp:382
virtual long AddGeometry(OGRGeometry *Geom, const long &oid, int layertype=wxNOT_FOUND)
Add geometry into database.
Definition tmgisdatavectormysql.cpp:1024
virtual OGRGeometryCollection * GetGeometryColByOID(wxArrayLong *OIDs)
Get all geometries passed as array.
Definition tmgisdatavectormysql.cpp:1089
Definition tmgisdatavector.h:48
Class representing real rectangle.
Definition tmgisscale.h:44