ToolMap
Loading...
Searching...
No Matches
tmGISDataVectorSHPMemory Class Reference
Inheritance diagram for tmGISDataVectorSHPMemory:
tmGISDataVectorSHP tmGISDataVector tmGISData

Public Member Functions

virtual bool CreateFile (const wxFileName &filename, int type)
 Create the shp on the disk.
 
- Public Member Functions inherited from tmGISDataVectorSHP
virtual bool Open (const wxString &filename, bool bReadWrite=FALSE)
 Generic open code.
 
virtual bool Close ()
 
virtual tmRealRect GetMinimalBoundingRectangle ()
 
virtual TM_GIS_SPATIAL_TYPES GetSpatialType ()
 
virtual bool SetSpatialFilter (tmRealRect filter, int type)
 
virtual bool SetAttributeFilter (const wxString &query)
 
virtual wxRealPoint * GetNextDataLine (int &nbvertex, long &oid, bool &isOver)
 
virtual wxRealPoint * GetNextDataPoint (long &oid, bool &isOver)
 
virtual int GetNextDataPolygonInfo (long &oid)
 
virtual wxRealPoint * GetNextDataPolygon (int currentring, int &nbvertex)
 
virtual OGRPolygon * GetNextDataOGRPolygon (long &oid)
 Get the actual feature as polygon.
 
virtual OGRFeature * GetNextFeature ()
 
virtual bool ResetReading ()
 
virtual OGRFeature * GetFeatureByOID (long oid)
 
bool SelectFeatureByOID (long oid)
 
virtual OGRGeometry * GetNextGeometry (bool restart, long &oid)
 
OGRLayer * GetLayerRef ()
 
virtual wxString GetMetaDataAsHtml ()
 Get Metadata information well formated.
 
virtual wxString GetDataSizeAsHtml (int iPrecision=2)
 Getting Data size.
 
virtual int GetCount ()
 Counting features in layer.
 
virtual int GetFieldsCount ()
 Get the number of fields.
 
virtual bool GetFieldsName (wxArrayString &Fields, long oid=wxNOT_FOUND)
 Getting fields name.
 
virtual bool GetFieldsValue (wxArrayString &values, long oid)
 
bool GetDistinctFieldsValue (const wxString &fieldname, wxArrayString &values)
 
virtual wxArrayLong * SearchData (const tmRealRect &rect, int type)
 Search spatial data.
 
virtual wxArrayLong * GetAllData ()
 Get OID of all features back from the shapefile.
 
virtual bool GetSnapCoord (const wxRealPoint &clickpt, double buffersize, wxArrayRealPoints &snapppts, int snaptype)
 Get snapping coordinate.
 
virtual bool AddFieldText (const wxString &fieldname, int size)
 Add text fields to the Shp.
 
virtual bool AddFieldNumeric (const wxString &fieldname, bool isfloat=false)
 Add int field to the Shp.
 
virtual bool AddFieldDate (const wxString &fieldname)
 Add date field to the Shp.
 
virtual long AddGeometry (OGRGeometry *Geom, const long &oid, int layertype=wxNOT_FOUND)
 Add a geometry in the shapefile.
 
virtual bool SetNextFeature (bool resetreading=false)
 Move to next feature.
 
virtual bool SetFieldValue (const wxString &value, int fieldtype, int iindex)
 Add value into a field.
 
virtual long GetActualOID ()
 Return the actual OID.
 
virtual void SetActualOID (long oid)
 Set the OID for the current Feature.
 
virtual bool UpdateFeature ()
 Update the actual feature.
 
virtual void CloseGeometry ()
 
virtual bool GetFieldNumeric (const wxString &fieldname, int &fieldvalue)
 
virtual bool SetFieldNumeric (const wxString &fieldname, int fieldvalue)
 
bool ExecuteSQLQuery (const wxString &query)
 
long GetFeatureIDIntersectedBy (OGRGeometry *geometry)
 
long GetFeatureIDIntersectedOnRaster (OGRPoint *geometry)
 
bool Rasterize (double rasterizefactor)
 
void RemoveRasterizeFile ()
 
virtual bool DeleteFile (const wxString &layername)
 
virtual bool CreateSpatialIndex (GDALProgressFunc progress, void *pfProgressData)
 
virtual bool CopyToFile (const wxFileName &filename, const wxString &drivername, bool overwrite)
 
- Public Member Functions inherited from tmGISDataVector
OGRLineString * InsertVertex (OGRGeometry *pointbuffer, wxRealPoint ptclicked, OGRLineString *line, int &inseredvertex)
 Insert a vertex in a passed line.
 
OGRLineString * InsertVertexMultiple (OGRLineString *line, OGRMultiPoint *vertex, const wxArrayInt &point_pos)
 Insert multiple vertex into line.
 
virtual bool UpdateGeometry (OGRGeometry *geom, const long &oid)
 
virtual bool SplitGeometry (OGRGeometryCollection *gCol, const long &oid, wxArrayLong &AddedIds, int layertype)
 Save splitted geometry to file.
 
virtual OGRGeometryCollection * GetGeometryColByOID (wxArrayLong *OIDs)
 
wxString GetFieldsMetadata ()
 Formating fields info into html string.
 
bool CutLineAtVertex (long oid, const wxRealPoint &clickedpt, int searchRadius, int layertype)
 Cut line in two at specified point.
 
bool CutLineGeometry (OGRLineString *line1, OGRLineString *line2, OGRMultiLineString &res1, OGRMultiLineString &res2)
 Cut two lines where they intesects.
 
bool CutLineMultiple (OGRLineString *linetocut, OGRMultiLineString *cutlines, OGRMultiLineString &results)
 Cut one line with multiple line.
 
bool LinesMerge (OGRMultiLineString *linetomerge, OGRGeometry **linemerged)
 Merge lines.
 
virtual wxArrayLong * SearchIntersectingGeometry (OGRGeometry *intersectinggeom)
 
virtual int IsRaster ()
 
- Public Member Functions inherited from tmGISData
 tmGISData ()
 Constructor.
 
 ~tmGISData ()
 Destructor.
 
int GetDataType ()
 
void SetCoordConvert (tmCoordConvert *coordconvert)
 
tmCoordConvertGetCoordConvert ()
 
wxString GetShortFileName ()
 
wxString GetFullFileName ()
 
virtual bool IsPointSnapped (const wxRealPoint &point, int snaptype, long excludeoid=wxNOT_FOUND)
 

Additional Inherited Members

- Static Public Member Functions inherited from tmGISDataVector
static void InitGISDriversVector ()
 
static wxString GetAllVectorGISFormatsWildcards ()
 
static tmGISDataVectorCreateGISVectorBasedOnType (const int &gis_format_index)
 
static tmGISDataVectorCreateGISVectorBasedOnExt (const wxString &extension)
 
static OGRGeometry * CreateOGRGeometry (const tmRealRect &rect)
 Create a OGR geometry.
 
- Static Public Member Functions inherited from tmGISData
static void InitGISDrivers (bool bRaster=TRUE, bool bVector=TRUE)
 Init the GDAL / OGR driver.
 
static wxString GetAllSupportedGISFormatsWildcards ()
 Return all supported formats.
 
static wxArrayString GetAllSupportedGISFormatsExtensions ()
 Returning all extensions in an array string.
 
static tmGISDataCreateGISBasedOnType (const int &gis_format_index)
 Create an object of the specified format.
 
static tmGISDataCreateGISBasedOnExt (const wxString &extension)
 
static tmGISDataLoadLayer (tmLayerProperties *layerprop)
 Call this function for loading a layer.
 
static void EnableLogging (bool enable=true)
 
static bool IsLoggingEnabled ()
 
- Protected Member Functions inherited from tmGISDataVector
virtual wxString GetTableName (TOC_GENERIC_NAME type)
 
bool CheckGEOSIntersection (GEOSGeom *rect, GEOSGeom *object)
 Compute real GEOS intersection (not bounding box)
 
bool CheckGEOSCrosses (GEOSGeom *g1, GEOSGeom *g2)
 Check for crossing (not bounding box)
 
GEOSGeom CreateGEOSGeometry (OGRGeometry *geom)
 Create a GEOS geometry.
 
GEOSGeom CreateGEOSGeometry (const tmRealRect &rect)
 Create a GEOS geometry.
 
bool GetVertexIntersection (OGRGeometry *geometry, OGRGeometry *buffer, wxArrayRealPoints &points)
 Search if a vertex intersect the passed geometry.
 
bool GetBeginEndInterseciton (OGRGeometry *geometry, OGRGeometry *buffer, wxArrayRealPoints &points)
 Search if a Begin/End vertex intersect the passed geometry.
 
- Protected Member Functions inherited from tmGISData
wxString GetMinimalBoundingRectangleAsHtml (int iprecision=2)
 Get Minimal bounding rectangle as html.
 
- Static Protected Member Functions inherited from tmGISDataVector
static OGRGeometry * SafeCreateFromGEOS (GEOSGeom geom)
 Safe conversion function.
 
static OGRGeometry * SafeBuffer (OGRGeometry *ogrgeom, int size)
 
static OGRGeometry * SafeIntersection (OGRGeometry *geom1, OGRGeometry *geom2)
 Compute intersection.
 
static OGRGeometry * SafeUnion (OGRGeometry *union1, OGRGeometry *line)
 Compute Union.
 
static OGRGeometry * CreateOGRGeometry (const wxRealPoint &pt)
 
- Protected Attributes inherited from tmGISDataVectorSHP
GDALDataset * m_Datasource
 
OGRLayer * m_Layer
 
GDALDataset * m_RasterizeDataset
 
OGRFeature * m_Feature
 
int m_polyTotalRings
 
int m_MultiFeaturesIterator
 
int m_MultiFeaturesOid
 
- Protected Attributes inherited from tmGISData
int m_ClassType
 

Member Function Documentation

◆ CreateFile()

bool tmGISDataVectorSHPMemory::CreateFile ( const wxFileName &  filename,
int  type 
)
virtual

Create the shp on the disk.

Parameters
filenamethe filename we want to create
typeone of the following values :
  • 0 for lines
  • 1 for points
  • 2 for polygons
Returns
true if file creation succeed, false otherwise
Author
Lucien Schreiber (c) CREALP 2008
Date
15 November 2008

Reimplemented from tmGISDataVectorSHP.


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