GDAL
ograpispy.h
Go to the documentation of this file.
1/******************************************************************************
2 * $Id: ograpispy.h 1efc44a83b04874a2485ddcab47afb141c4d6721 2017-08-18 14:40:18Z Even Rouault $
3 *
4 * Project: OpenGIS Simple Features Reference Implementation
5 * Purpose: OGR C API "Spy"
6 * Author: Even Rouault, even.rouault at spatialys.com
7 *
8 ******************************************************************************
9 * Copyright (c) 2014, Even Rouault <even.rouault at spatialys.com>
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the "Software"),
13 * to deal in the Software without restriction, including without limitation
14 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 * and/or sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 * DEALINGS IN THE SOFTWARE.
28 ****************************************************************************/
29
30#ifndef OGRAPISPY_H_INCLUDED
31#define OGRAPISPY_H_INCLUDED
32
33#include "gdal.h"
34
64#ifdef DEBUG
65#define OGRAPISPY_ENABLED
66#endif
67
68#ifdef OGRAPISPY_ENABLED
69
71
72extern int bOGRAPISpyEnabled;
73
74void OGRAPISpyDestroyMutex();
75
76int OGRAPISpyOpenTakeSnapshot(const char* pszName, int bUpdate);
77void OGRAPISpyOpen(const char* pszName, int bUpdate, int iSnapshot,
78 GDALDatasetH* phDS);
79void OGRAPISpyPreClose(OGRDataSourceH hDS);
80void OGRAPISpyPostClose();
81void OGRAPISpyCreateDataSource(OGRSFDriverH hDriver, const char* pszName,
82 char** papszOptions, OGRDataSourceH hDS);
83void OGRAPISpyDeleteDataSource(OGRSFDriverH hDriver, const char* pszName);
84
85void OGRAPISpy_DS_GetLayerCount( OGRDataSourceH hDS );
86void OGRAPISpy_DS_GetLayer( OGRDataSourceH hDS, int iLayer, OGRLayerH hLayer );
87void OGRAPISpy_DS_GetLayerByName( OGRDataSourceH hDS, const char* pszLayerName,
88 OGRLayerH hLayer );
89void OGRAPISpy_DS_ExecuteSQL( OGRDataSourceH hDS,
90 const char *pszStatement,
91 OGRGeometryH hSpatialFilter,
92 const char *pszDialect,
93 OGRLayerH hLayer);
94void OGRAPISpy_DS_ReleaseResultSet( OGRDataSourceH hDS, OGRLayerH hLayer);
95
96void OGRAPISpy_DS_CreateLayer( OGRDataSourceH hDS,
97 const char * pszName,
98 OGRSpatialReferenceH hSpatialRef,
100 char ** papszOptions,
101 OGRLayerH hLayer);
102void OGRAPISpy_DS_DeleteLayer( OGRDataSourceH hDS, int iLayer );
103
104void OGRAPISpy_Dataset_StartTransaction( GDALDatasetH hDS, int bForce );
105void OGRAPISpy_Dataset_CommitTransaction( GDALDatasetH hDS );
106void OGRAPISpy_Dataset_RollbackTransaction( GDALDatasetH hDS );
107
108void OGRAPISpy_L_GetFeatureCount( OGRLayerH hLayer, int bForce );
109void OGRAPISpy_L_GetExtent( OGRLayerH hLayer, int bForce );
110void OGRAPISpy_L_GetExtentEx( OGRLayerH hLayer, int iGeomField, int bForce );
111void OGRAPISpy_L_SetAttributeFilter( OGRLayerH hLayer, const char* pszFilter );
112void OGRAPISpy_L_GetFeature( OGRLayerH hLayer, GIntBig nFeatureId );
113void OGRAPISpy_L_SetNextByIndex( OGRLayerH hLayer, GIntBig nIndex );
114void OGRAPISpy_L_GetNextFeature( OGRLayerH hLayer );
115void OGRAPISpy_L_SetFeature( OGRLayerH hLayer, OGRFeatureH hFeat );
116void OGRAPISpy_L_CreateFeature( OGRLayerH hLayer, OGRFeatureH hFeat );
117void OGRAPISpy_L_CreateField( OGRLayerH hLayer, OGRFieldDefnH hField,
118 int bApproxOK );
119void OGRAPISpy_L_DeleteField( OGRLayerH hLayer, int iField );
120void OGRAPISpy_L_ReorderFields( OGRLayerH hLayer, int* panMap );
121void OGRAPISpy_L_ReorderField( OGRLayerH hLayer, int iOldFieldPos,
122 int iNewFieldPos );
123void OGRAPISpy_L_AlterFieldDefn( OGRLayerH hLayer, int iField,
124 OGRFieldDefnH hNewFieldDefn,
125 int nFlags );
126void OGRAPISpy_L_CreateGeomField( OGRLayerH hLayer, OGRGeomFieldDefnH hField,
127 int bApproxOK );
128void OGRAPISpy_L_StartTransaction( OGRLayerH hLayer );
129void OGRAPISpy_L_CommitTransaction( OGRLayerH hLayer );
130void OGRAPISpy_L_RollbackTransaction( OGRLayerH hLayer );
131void OGRAPISpy_L_GetLayerDefn( OGRLayerH hLayer );
132void OGRAPISpy_L_FindFieldIndex( OGRLayerH hLayer, const char *pszFieldName,
133 int bExactMatch );
134void OGRAPISpy_L_GetSpatialRef( OGRLayerH hLayer );
135void OGRAPISpy_L_TestCapability( OGRLayerH hLayer, const char* pszCap );
136void OGRAPISpy_L_GetSpatialFilter( OGRLayerH hLayer );
137void OGRAPISpy_L_SetSpatialFilter( OGRLayerH hLayer, OGRGeometryH hGeom );
138void OGRAPISpy_L_SetSpatialFilterEx( OGRLayerH hLayer, int iGeomField,
139 OGRGeometryH hGeom );
140void OGRAPISpy_L_SetSpatialFilterRect( OGRLayerH hLayer,
141 double dfMinX, double dfMinY,
142 double dfMaxX, double dfMaxY);
143void OGRAPISpy_L_SetSpatialFilterRectEx( OGRLayerH hLayer, int iGeomField,
144 double dfMinX, double dfMinY,
145 double dfMaxX, double dfMaxY);
146void OGRAPISpy_L_ResetReading( OGRLayerH hLayer );
147void OGRAPISpy_L_SyncToDisk( OGRLayerH hLayer );
148void OGRAPISpy_L_DeleteFeature( OGRLayerH hLayer, GIntBig nFID );
149void OGRAPISpy_L_GetFIDColumn( OGRLayerH hLayer );
150void OGRAPISpy_L_GetGeometryColumn( OGRLayerH hLayer );
151void OGRAPISpy_L_GetName( OGRLayerH hLayer );
152void OGRAPISpy_L_GetGeomType( OGRLayerH hLayer );
153void OGRAPISpy_L_SetIgnoredFields( OGRLayerH hLayer,
154 const char** papszIgnoredFields );
155
156void OGRAPISpy_FD_GetGeomType(OGRFeatureDefnH hDefn);
157void OGRAPISpy_FD_GetFieldCount(OGRFeatureDefnH hDefn);
158void OGRAPISpy_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField,
159 OGRFieldDefnH hGeomField);
160void OGRAPISpy_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char* pszFieldName);
161
162void OGRAPISpy_Fld_GetXXXX(OGRFieldDefnH hField, const char* pszOp);
163
164void OGRAPISpy_FD_GetGeomFieldCount(OGRFeatureDefnH hDefn);
165void OGRAPISpy_FD_GetGeomFieldDefn(OGRFeatureDefnH hDefn, int iGeomField,
166 OGRGeomFieldDefnH hGeomField);
167void OGRAPISpy_FD_GetGeomFieldIndex(OGRFeatureDefnH hDefn, const char* pszFieldName);
168void OGRAPISpy_GFld_GetXXXX(OGRGeomFieldDefnH hGeomField, const char* pszOp);
169
171
172#endif /* OGRAPISPY_ENABLED */
173
174#endif /* OGRAPISPY_H_INCLUDED */
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:248
Public (C callable) GDAL entry points.
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:255
void * OGRGeometryH
Opaque type for a geometry.
Definition: ogr_api.h:60
void * OGRSpatialReferenceH
Opaque type for a spatial reference system.
Definition: ogr_api.h:74
void * OGRFieldDefnH
Opaque type for a field definition (OGRFieldDefn)
Definition: ogr_api.h:298
void * OGRLayerH
Opaque type for a layer (OGRLayer)
Definition: ogr_api.h:509
void * OGRFeatureDefnH
Opaque type for a feature definition (OGRFeatureDefn)
Definition: ogr_api.h:300
void * OGRFeatureH
Opaque type for a feature (OGRFeature)
Definition: ogr_api.h:302
struct OGRGeomFieldDefnHS * OGRGeomFieldDefnH
Opaque type for a geometry field definition (OGRGeomFieldDefn)
Definition: ogr_api.h:307
void * OGRSFDriverH
Opaque type for a OGR driver (OGRSFDriver)
Definition: ogr_api.h:513
void * OGRDataSourceH
Opaque type for a OGR datasource (OGRDataSource)
Definition: ogr_api.h:511
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:318

Generated for GDAL by doxygen 1.9.4.