ToolMap
|
Public Member Functions | |
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 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 OGRFeature * | GetNextFeature () |
virtual bool | ResetReading () |
virtual wxRealPoint * | GetNextDataPoint (long &oid, bool &isOver) |
virtual int | GetNextDataPolygonInfo (long &oid) |
virtual wxRealPoint * | GetNextDataPolygon (int currentring, int &nbvertex) |
virtual OGRFeature * | GetFeatureByOID (long oid) |
virtual long | AddGeometry (OGRGeometry *Geom, const long &oid, int layertype=wxNOT_FOUND) |
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) |
virtual void | CloseGeometry () |
virtual OGRGeometry * | GetNextGeometry (bool restart, long &oid) |
virtual bool | DeleteFile (const wxString &layername) |
virtual int | GetCount () |
virtual int | GetFieldsCount () |
virtual bool | GetFieldsName (wxArrayString &Fields, long oid=wxNOT_FOUND) |
virtual bool | GetFieldsValue (wxArrayString &values, long oid) |
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) |
tmCoordConvert * | GetCoordConvert () |
virtual bool | Open (const wxString &filename, bool bReadWrite=TRUE) |
Generic open code. | |
virtual bool | Close () |
virtual tmRealRect | GetMinimalBoundingRectangle () |
wxString | GetShortFileName () |
wxString | GetFullFileName () |
virtual wxString | GetMetaDataAsHtml () |
virtual wxString | GetDataSizeAsHtml (int iPrecision=2) |
virtual wxArrayLong * | SearchData (const tmRealRect &rect, int type) |
virtual wxArrayLong * | GetAllData () |
virtual bool | GetSnapCoord (const wxRealPoint &clickpt, double buffersize, wxArrayRealPoints &snapppts, int snaptype) |
virtual bool | IsPointSnapped (const wxRealPoint &point, int snaptype, long excludeoid=wxNOT_FOUND) |
virtual bool | CreateSpatialIndex (GDALProgressFunc progress, void *pfProgressData) |
Static Public Member Functions | |
static void | InitGISDriversVector () |
static wxString | GetAllVectorGISFormatsWildcards () |
static tmGISDataVector * | CreateGISVectorBasedOnType (const int &gis_format_index) |
static tmGISDataVector * | CreateGISVectorBasedOnExt (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 tmGISData * | CreateGISBasedOnType (const int &gis_format_index) |
Create an object of the specified format. | |
static tmGISData * | CreateGISBasedOnExt (const wxString &extension) |
static tmGISData * | LoadLayer (tmLayerProperties *layerprop) |
Call this function for loading a layer. | |
static void | EnableLogging (bool enable=true) |
static bool | IsLoggingEnabled () |
Protected Member Functions | |
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 | |
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) |
Additional Inherited Members | |
Protected Attributes inherited from tmGISData | |
int | m_ClassType |
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL, and tmGISDataVectorSHP.
|
protected |
Check for crossing (not bounding box)
This function may be used for ensuring that a geometry really crosses another one
g1 | GEOS geometry |
g2 | GEOS geometry |
|
protected |
Compute real GEOS intersection (not bounding box)
This function may be used for ensuring that a geometry really intersects another one
rect | GEOS geometry of intersecting rectangle |
object | GEOS geometry of object |
|
protected |
Create a GEOS geometry.
This function may be used for creating a GEOS compatible geometry from an real rectangle
rect | A tmRealRect object |
|
protected |
Create a GEOS geometry.
This function may be used for creating a GEOS compatible geometry from an OGR object
geom | A valid OGR geometry |
|
static |
Create a OGR geometry.
rect | object of type : tmRealRect |
bool tmGISDataVector::CutLineAtVertex | ( | long | oid, |
const wxRealPoint & | clickedpt, | ||
int | searchRadius, | ||
int | layertype | ||
) |
Cut line in two at specified point.
oid | OID of the line to cut |
clickedpt | the coordinate of the clicked point (real) |
searchradius | Serching vertex in this radius |
layertype | Type of the layer. |
bool tmGISDataVector::CutLineGeometry | ( | OGRLineString * | line1, |
OGRLineString * | line2, | ||
OGRMultiLineString & | res1, | ||
OGRMultiLineString & | res2 | ||
) |
Cut two lines where they intesects.
line1 | The first passed line for intersection |
line2 | The second line passed for intersection |
res1 | Resulting multi-lines for first passed lines |
res2 | Resulting multi-lines for second passed line |
bool tmGISDataVector::CutLineMultiple | ( | OGRLineString * | linetocut, |
OGRMultiLineString * | cutlines, | ||
OGRMultiLineString & | results | ||
) |
Cut one line with multiple line.
linetocut | The line to cut |
cutlines | Lines used for cutting |
results | all resulting lines |
|
protected |
Search if a Begin/End vertex intersect the passed geometry.
This function is very close to the tmGISDataVector::GetVertexIntersection but search only for begin / end vertex. So it works only for lines
geometry | A valid geometry (line ONLY) |
buffer | The buffer for intersection |
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL, and tmGISDataVectorSHP.
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL.
|
inlinevirtual |
Reimplemented in tmGISDataVectorSHP.
wxString tmGISDataVector::GetFieldsMetadata | ( | ) |
Formating fields info into html string.
|
inlinevirtual |
Reimplemented in tmGISDataVectorSHP.
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL.
|
inlinevirtual |
Reimplemented from tmGISData.
Reimplemented in tmGISDataVectorMYSQL.
|
protected |
Search if a vertex intersect the passed geometry.
Check for all geometry (point, lines, polygon) if a vertex intersect the passed geometry. If true this vertex is returned
geometry | A valid geometry (point, line, polygon) |
buffer | The buffer for intersection |
OGRLineString * tmGISDataVector::InsertVertex | ( | OGRGeometry * | pointbuffer, |
wxRealPoint | ptclicked, | ||
OGRLineString * | line, | ||
int & | inseredvertex | ||
) |
Insert a vertex in a passed line.
pointbuffer | the buffer (polygon) intersecting the line |
ptclicked | the coordinate of the clicked point |
line | the line |
inseredvertex | return the number of the inserted vertex |
OGRLineString * tmGISDataVector::InsertVertexMultiple | ( | OGRLineString * | line, |
OGRMultiPoint * | vertex, | ||
const wxArrayInt & | point_pos | ||
) |
Insert multiple vertex into line.
This function insert vertex at the right place into a line, based on where intersect the vertex to insert.
line | the passed geometry |
vertex | an OGRMultiPoint structure containing all vertex to insert |
point_pos | index where the vertex are to be insered |
|
inlinevirtual |
Reimplemented from tmGISData.
bool tmGISDataVector::LinesMerge | ( | OGRMultiLineString * | linetomerge, |
OGRGeometry ** | linemerged | ||
) |
Merge lines.
linetomerge | lines to merge |
linemerged | the resulting geometry if function return true. |
|
staticprotected |
Safe conversion function.
geosGeom | The GEOSGeom to convert |
|
staticprotected |
Compute intersection.
This function try to bypass the Intersection() bug of GDAL by using GEOS directly
geom1 | The geometry to intersect |
geom2 | the geometry intersecting |
|
staticprotected |
Compute Union.
This function try to bypass the Union() bug of GDAL by using GEOS directly
union1 | The multi-line string |
line | The line to intersect |
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL.
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL.
|
virtual |
Save splitted geometry to file.
The first geometry is updated, others are added into database.
gCol | the collection of geometries to update |
oid | the oid |
AddedIds | All IDs added. |
layertype | one of the TOC_GENERIC_NAME values |
|
inlinevirtual |
Reimplemented in tmGISDataVectorMYSQL.