GDAL

ograpispy.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Project: OpenGIS Simple Features Reference Implementation
4 * Purpose: OGR C API "Spy"
5 * Author: Even Rouault, even.rouault at spatialys.com
6 *
7 ******************************************************************************
8 * Copyright (c) 2014, Even Rouault <even.rouault at spatialys.com>
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef OGRAPISPY_H_INCLUDED
14#define OGRAPISPY_H_INCLUDED
15
16#include "gdal.h"
17
46#if defined(DEBUG) || defined(GDAL_DEBUG)
47#define OGRAPISPY_ENABLED
48#endif
49
50#ifdef OGRAPISPY_ENABLED
51
52 CPL_C_START
53
54 extern int bOGRAPISpyEnabled;
55
56 void OGRAPISpyDestroyMutex();
57
58 int OGRAPISpyOpenTakeSnapshot(const char *pszName, int bUpdate);
59 void OGRAPISpyOpen(const char *pszName, int bUpdate, int iSnapshot,
60 GDALDatasetH *phDS);
61 void OGRAPISpyPreClose(GDALDatasetH hDS);
62 void OGRAPISpyPostClose();
63 void OGRAPISpyCreateDataSource(GDALDriverH hDriver, const char *pszName,
64 char **papszOptions, GDALDatasetH hDS);
65 void OGRAPISpyDeleteDataSource(GDALDriverH hDriver, const char *pszName);
66
67 void OGRAPISpy_DS_GetLayerCount(GDALDatasetH hDS);
68 void OGRAPISpy_DS_GetLayer(GDALDatasetH hDS, int iLayer, OGRLayerH hLayer);
69 void OGRAPISpy_DS_GetLayerByName(GDALDatasetH hDS, const char *pszLayerName,
70 OGRLayerH hLayer);
71 void OGRAPISpy_DS_ExecuteSQL(GDALDatasetH hDS, const char *pszStatement,
72 OGRGeometryH hSpatialFilter,
73 const char *pszDialect, OGRLayerH hLayer);
74 void OGRAPISpy_DS_ReleaseResultSet(GDALDatasetH hDS, OGRLayerH hLayer);
75
76 void OGRAPISpy_DS_CreateLayer(GDALDatasetH hDS, const char *pszName,
77 OGRSpatialReferenceH hSpatialRef,
78 OGRwkbGeometryType eType, char **papszOptions,
79 OGRLayerH hLayer);
80 void OGRAPISpy_DS_DeleteLayer(GDALDatasetH hDS, int iLayer);
81
82 void OGRAPISpy_Dataset_StartTransaction(GDALDatasetH hDS, int bForce);
83 void OGRAPISpy_Dataset_CommitTransaction(GDALDatasetH hDS);
84 void OGRAPISpy_Dataset_RollbackTransaction(GDALDatasetH hDS);
85
86 void OGRAPISpy_L_GetFeatureCount(OGRLayerH hLayer, int bForce);
87 void OGRAPISpy_L_GetExtent(OGRLayerH hLayer, int bForce);
88 void OGRAPISpy_L_GetExtentEx(OGRLayerH hLayer, int iGeomField, int bForce);
89 void OGRAPISpy_L_GetExtent3D(OGRLayerH hLayer, int iGeomField, int bForce);
90 void OGRAPISpy_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszFilter);
91 void OGRAPISpy_L_GetFeature(OGRLayerH hLayer, GIntBig nFeatureId);
92 void OGRAPISpy_L_SetNextByIndex(OGRLayerH hLayer, GIntBig nIndex);
93 void OGRAPISpy_L_GetNextFeature(OGRLayerH hLayer);
94 void OGRAPISpy_L_SetFeature(OGRLayerH hLayer, OGRFeatureH hFeat);
95 void OGRAPISpy_L_CreateFeature(OGRLayerH hLayer, OGRFeatureH hFeat);
96 void OGRAPISpy_L_UpsertFeature(OGRLayerH hLayer, OGRFeatureH hFeat);
97 void OGRAPISpy_L_CreateField(OGRLayerH hLayer, OGRFieldDefnH hField,
98 int bApproxOK);
99 void OGRAPISpy_L_DeleteField(OGRLayerH hLayer, int iField);
100 void OGRAPISpy_L_ReorderFields(OGRLayerH hLayer, int *panMap);
101 void OGRAPISpy_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos,
102 int iNewFieldPos);
103 void OGRAPISpy_L_AlterFieldDefn(OGRLayerH hLayer, int iField,
104 OGRFieldDefnH hNewFieldDefn, int nFlags);
105 void OGRAPISpy_L_CreateGeomField(OGRLayerH hLayer, OGRGeomFieldDefnH hField,
106 int bApproxOK);
107 void OGRAPISpy_L_StartTransaction(OGRLayerH hLayer);
108 void OGRAPISpy_L_CommitTransaction(OGRLayerH hLayer);
109 void OGRAPISpy_L_RollbackTransaction(OGRLayerH hLayer);
110 void OGRAPISpy_L_GetLayerDefn(OGRLayerH hLayer);
111 void OGRAPISpy_L_FindFieldIndex(OGRLayerH hLayer, const char *pszFieldName,
112 int bExactMatch);
113 void OGRAPISpy_L_GetSpatialRef(OGRLayerH hLayer);
114 void OGRAPISpy_L_TestCapability(OGRLayerH hLayer, const char *pszCap);
115 void OGRAPISpy_L_GetSpatialFilter(OGRLayerH hLayer);
116 void OGRAPISpy_L_SetSpatialFilter(OGRLayerH hLayer, OGRGeometryH hGeom);
117 void OGRAPISpy_L_SetSpatialFilterEx(OGRLayerH hLayer, int iGeomField,
118 OGRGeometryH hGeom);
119 void OGRAPISpy_L_SetSpatialFilterRect(OGRLayerH hLayer, double dfMinX,
120 double dfMinY, double dfMaxX,
121 double dfMaxY);
122 void OGRAPISpy_L_SetSpatialFilterRectEx(OGRLayerH hLayer, int iGeomField,
123 double dfMinX, double dfMinY,
124 double dfMaxX, double dfMaxY);
125 void OGRAPISpy_L_ResetReading(OGRLayerH hLayer);
126 void OGRAPISpy_L_SyncToDisk(OGRLayerH hLayer);
127 void OGRAPISpy_L_DeleteFeature(OGRLayerH hLayer, GIntBig nFID);
128 void OGRAPISpy_L_GetFIDColumn(OGRLayerH hLayer);
129 void OGRAPISpy_L_GetGeometryColumn(OGRLayerH hLayer);
130 void OGRAPISpy_L_GetName(OGRLayerH hLayer);
131 void OGRAPISpy_L_GetGeomType(OGRLayerH hLayer);
132 void OGRAPISpy_L_SetIgnoredFields(OGRLayerH hLayer,
133 const char **papszIgnoredFields);
134
135 void OGRAPISpy_FD_GetGeomType(OGRFeatureDefnH hDefn);
136 void OGRAPISpy_FD_GetFieldCount(OGRFeatureDefnH hDefn);
137 void OGRAPISpy_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField,
138 OGRFieldDefnH hGeomField);
139 void OGRAPISpy_FD_GetFieldIndex(OGRFeatureDefnH hDefn,
140 const char *pszFieldName);
141
142 void OGRAPISpy_Fld_GetXXXX(OGRFieldDefnH hField, const char *pszOp);
143
144 void OGRAPISpy_FD_GetGeomFieldCount(OGRFeatureDefnH hDefn);
145 void OGRAPISpy_FD_GetGeomFieldDefn(OGRFeatureDefnH hDefn, int iGeomField,
146 OGRGeomFieldDefnH hGeomField);
147 void OGRAPISpy_FD_GetGeomFieldIndex(OGRFeatureDefnH hDefn,
148 const char *pszFieldName);
149 void OGRAPISpy_GFld_GetXXXX(OGRGeomFieldDefnH hGeomField, const char *pszOp);
150
151 CPL_C_END
152
153#endif /* OGRAPISPY_ENABLED */
154
155#endif /* OGRAPISPY_H_INCLUDED */
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:289
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:285
GIntBig
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:205
gdal.h
Public (C callable) GDAL entry points.
OGRGeometryH
void * OGRGeometryH
Opaque type for a geometry.
Definition gdal_fwd.h:96
GDALDatasetH
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition gdal_fwd.h:42
OGRSpatialReferenceH
void * OGRSpatialReferenceH
Opaque type for a spatial reference system.
Definition gdal_fwd.h:195
OGRFieldDefnH
void * OGRFieldDefnH
Opaque type for a field definition (OGRFieldDefn)
Definition gdal_fwd.h:122
OGRLayerH
void * OGRLayerH
Opaque type for a layer (OGRLayer)
Definition gdal_fwd.h:157
OGRFeatureDefnH
void * OGRFeatureDefnH
Opaque type for a feature definition (OGRFeatureDefn)
Definition gdal_fwd.h:124
OGRFeatureH
void * OGRFeatureH
Opaque type for a feature (OGRFeature)
Definition gdal_fwd.h:141
OGRGeomFieldDefnH
struct OGRGeomFieldDefnHS * OGRGeomFieldDefnH
Opaque type for a geometry field definition (OGRGeomFieldDefn)
Definition gdal_fwd.h:128
GDALDriverH
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition gdal_fwd.h:51
OGRwkbGeometryType
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:405