GDAL

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