GDAL
ogrsf_frmts.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Project: OpenGIS Simple Features Reference Implementation
4 * Purpose: Classes related to format registration, and file opening.
5 * Author: Frank Warmerdam, warmerda@home.com
6 *
7 ******************************************************************************
8 * Copyright (c) 1999, Les Technologies SoftMap Inc.
9 * Copyright (c) 2007-2014, Even Rouault <even dot rouault at spatialys.com>
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef OGRSF_FRMTS_H_INCLUDED
15#define OGRSF_FRMTS_H_INCLUDED
16
17#include "cpl_progress.h"
18#include "ogr_feature.h"
19#include "ogr_featurestyle.h"
20#include "gdal_priv.h"
21
22#include <memory>
23#include <deque>
24
32#if !defined(GDAL_COMPILATION) && !defined(SUPPRESS_DEPRECATION_WARNINGS)
33#define OGR_DEPRECATED(x) CPL_WARN_DEPRECATED(x)
34#else
35#define OGR_DEPRECATED(x)
36#endif
37
38#ifndef CPPCHECK_STATIC
39#define CPPCHECK_STATIC
40#endif
42
43class OGRLayerAttrIndex;
44class OGRSFDriver;
45
46struct ArrowArrayStream;
47
48/************************************************************************/
49/* OGRLayer */
50/************************************************************************/
51
57/* Note: any virtual method added to this class must also be added in the */
58/* OGRLayerDecorator and OGRMutexedLayer classes. */
59
60class CPL_DLL OGRLayer : public GDALMajorObject
61{
62 private:
63 struct Private;
64 std::unique_ptr<Private> m_poPrivate;
65
66 void ConvertGeomsIfNecessary(OGRFeature *poFeature);
67
68 class CPL_DLL FeatureIterator
69 {
70 struct Private;
71 std::unique_ptr<Private> m_poPrivate;
72
73 public:
74 FeatureIterator(OGRLayer *poLayer, bool bStart);
75 FeatureIterator(
76 FeatureIterator &&oOther) noexcept; // declared but not defined.
77 // Needed for gcc 5.4 at least
78 ~FeatureIterator();
79 OGRFeatureUniquePtr &operator*();
80 FeatureIterator &operator++();
81 bool operator!=(const FeatureIterator &it) const;
82 };
83
84 friend inline FeatureIterator begin(OGRLayer *poLayer);
85 friend inline FeatureIterator end(OGRLayer *poLayer);
86
88
89 protected:
91 int m_bFilterIsEnvelope;
92 OGRGeometry *m_poFilterGeom;
93 OGRPreparedGeometry *m_pPreparedFilterGeom; /* m_poFilterGeom compiled as a
94 prepared geometry */
95 OGREnvelope m_sFilterEnvelope;
96 int m_iGeomFieldFilter; // specify the index on which the spatial
97 // filter is active.
98
99 int FilterGeometry(const OGRGeometry *);
100 // int FilterGeometry( OGRGeometry *, OGREnvelope*
101 // psGeometryEnvelope);
102 int InstallFilter(const OGRGeometry *);
103 bool
104 ValidateGeometryFieldIndexForSetSpatialFilter(int iGeomField,
105 const OGRGeometry *poGeomIn,
106 bool bIsSelectLayer = false);
108
109 virtual OGRErr IGetExtent(int iGeomField, OGREnvelope *psExtent,
110 bool bForce) CPL_WARN_UNUSED_RESULT;
111
112 virtual OGRErr IGetExtent3D(int iGeomField, OGREnvelope3D *psExtent3D,
113 bool bForce) CPL_WARN_UNUSED_RESULT;
114
115 virtual OGRErr ISetSpatialFilter(int iGeomField, const OGRGeometry *);
116
117 virtual OGRErr ISetFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT;
118 virtual OGRErr
119 ISetFeatureUniqPtr(std::unique_ptr<OGRFeature>) CPL_WARN_UNUSED_RESULT;
120 virtual OGRErr ICreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT;
121 virtual OGRErr
122 ICreateFeatureUniqPtr(std::unique_ptr<OGRFeature> poFeature,
123 GIntBig *pnFID = nullptr) CPL_WARN_UNUSED_RESULT;
124 virtual OGRErr IUpsertFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT;
125 virtual OGRErr
126 IUpdateFeature(OGRFeature *poFeature, int nUpdatedFieldsCount,
127 const int *panUpdatedFieldsIdx, int nUpdatedGeomFieldsCount,
128 const int *panUpdatedGeomFieldsIdx,
129 bool bUpdateStyleString) CPL_WARN_UNUSED_RESULT;
130
132 CPLStringList m_aosArrowArrayStreamOptions{};
133
134 friend struct OGRGenSQLResultsLayerArrowStreamPrivateData;
135
136 struct ArrowArrayStreamPrivateData
137 {
138 bool m_bArrowArrayStreamInProgress = false;
139 bool m_bEOF = false;
140 OGRLayer *m_poLayer = nullptr;
141 std::vector<GIntBig> m_anQueriedFIDs{};
142 size_t m_iQueriedFIDS = 0;
143 std::deque<std::unique_ptr<OGRFeature>> m_oFeatureQueue{};
144 };
145
146 std::shared_ptr<ArrowArrayStreamPrivateData>
147 m_poSharedArrowArrayStreamPrivateData{};
148
149 struct ArrowArrayStreamPrivateDataSharedDataWrapper
150 {
151 std::shared_ptr<ArrowArrayStreamPrivateData> poShared{};
152 };
154
155 friend class OGRArrowArrayHelper;
156 friend class OGRGenSQLResultsLayer;
157 static void ReleaseArray(struct ArrowArray *array);
158 static void ReleaseSchema(struct ArrowSchema *schema);
159 static void ReleaseStream(struct ArrowArrayStream *stream);
160 virtual int GetArrowSchema(struct ArrowArrayStream *,
161 struct ArrowSchema *out_schema);
162 virtual int GetNextArrowArray(struct ArrowArrayStream *,
163 struct ArrowArray *out_array);
164 static int StaticGetArrowSchema(struct ArrowArrayStream *,
165 struct ArrowSchema *out_schema);
166 static int StaticGetNextArrowArray(struct ArrowArrayStream *,
167 struct ArrowArray *out_array);
168 static const char *GetLastErrorArrowArrayStream(struct ArrowArrayStream *);
169
170 static struct ArrowSchema *
171 CreateSchemaForWKBGeometryColumn(const OGRGeomFieldDefn *poFieldDefn,
172 const char *pszArrowFormat,
173 const char *pszExtensionName);
174
175 virtual bool
176 CanPostFilterArrowArray(const struct ArrowSchema *schema) const;
177 void PostFilterArrowArray(const struct ArrowSchema *schema,
178 struct ArrowArray *array,
179 CSLConstList papszOptions) const;
180
182 bool CreateFieldFromArrowSchemaInternal(const struct ArrowSchema *schema,
183 const std::string &osFieldPrefix,
184 CSLConstList papszOptions);
186
187 public:
188 OGRLayer();
189 ~OGRLayer() override;
190
200 FeatureIterator begin();
201
203 FeatureIterator end();
204
205 virtual OGRGeometry *GetSpatialFilter();
206
207 OGRErr SetSpatialFilter(const OGRGeometry *);
208 OGRErr SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX,
209 double dfMaxY);
210
211 OGRErr SetSpatialFilter(int iGeomField, const OGRGeometry *);
212 OGRErr SetSpatialFilterRect(int iGeomField, double dfMinX, double dfMinY,
213 double dfMaxX, double dfMaxY);
214
215 virtual OGRErr SetAttributeFilter(const char *);
216
217 virtual void ResetReading() = 0;
219 virtual OGRErr SetNextByIndex(GIntBig nIndex);
220 virtual OGRFeature *GetFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT;
221
222 virtual GDALDataset *GetDataset();
223 virtual bool GetArrowStream(struct ArrowArrayStream *out_stream,
224 CSLConstList papszOptions = nullptr);
225 virtual bool IsArrowSchemaSupported(const struct ArrowSchema *schema,
226 CSLConstList papszOptions,
227 std::string &osErrorMsg) const;
228 virtual bool
229 CreateFieldFromArrowSchema(const struct ArrowSchema *schema,
230 CSLConstList papszOptions = nullptr);
231 virtual bool WriteArrowBatch(const struct ArrowSchema *schema,
232 struct ArrowArray *array,
233 CSLConstList papszOptions = nullptr);
234
235 OGRErr SetFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT;
236 OGRErr
237 SetFeature(std::unique_ptr<OGRFeature> poFeature) CPL_WARN_UNUSED_RESULT;
238 OGRErr CreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT;
239 OGRErr CreateFeature(std::unique_ptr<OGRFeature> poFeature,
240 GIntBig *pnFID = nullptr) CPL_WARN_UNUSED_RESULT;
241 OGRErr UpsertFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT;
242 OGRErr UpdateFeature(OGRFeature *poFeature, int nUpdatedFieldsCount,
243 const int *panUpdatedFieldsIdx,
244 int nUpdatedGeomFieldsCount,
245 const int *panUpdatedGeomFieldsIdx,
246 bool bUpdateStyleString) CPL_WARN_UNUSED_RESULT;
247
248 virtual OGRErr DeleteFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT;
249
250 virtual const char *GetName() const;
251 virtual OGRwkbGeometryType GetGeomType() const;
252 virtual const OGRFeatureDefn *GetLayerDefn() const = 0;
253
254 OGRFeatureDefn *GetLayerDefn()
255 {
256 return const_cast<OGRFeatureDefn *>(
257 const_cast<const OGRLayer *>(this)->GetLayerDefn());
258 }
259
260 virtual int FindFieldIndex(const char *pszFieldName, int bExactMatch);
261
262 virtual const OGRSpatialReference *GetSpatialRef() const;
263
265 typedef std::vector<OGRSpatialReferenceRefCountedPtr>
267 virtual const GetSupportedSRSListRetType &
268 GetSupportedSRSList(int iGeomField);
269 virtual OGRErr SetActiveSRS(int iGeomField,
270 const OGRSpatialReference *poSRS);
271
272 virtual GIntBig GetFeatureCount(int bForce = TRUE);
273
274 OGRErr GetExtent(OGREnvelope *psExtent,
275 bool bForce = true) CPL_WARN_UNUSED_RESULT;
276 OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent,
277 bool bForce = true) CPL_WARN_UNUSED_RESULT;
278
279 OGRErr GetExtent3D(int iGeomField, OGREnvelope3D *psExtent,
280 bool bForce = true) CPL_WARN_UNUSED_RESULT;
281
282 virtual int TestCapability(const char *) const = 0;
283
284 virtual OGRErr Rename(const char *pszNewName) CPL_WARN_UNUSED_RESULT;
285
286 virtual OGRErr CreateField(const OGRFieldDefn *poField,
287 int bApproxOK = TRUE) CPL_WARN_UNUSED_RESULT;
288 virtual OGRErr DeleteField(int iField);
289 virtual OGRErr ReorderFields(int *panMap);
290 virtual OGRErr AlterFieldDefn(int iField, OGRFieldDefn *poNewFieldDefn,
291 int nFlagsIn);
292 virtual OGRErr
293 AlterGeomFieldDefn(int iGeomField,
294 const OGRGeomFieldDefn *poNewGeomFieldDefn,
295 int nFlagsIn);
296
297 virtual OGRErr CreateGeomField(const OGRGeomFieldDefn *poField,
298 int bApproxOK = TRUE);
299
300 virtual OGRErr SyncToDisk();
301
302 virtual OGRStyleTable *GetStyleTable();
303 virtual void SetStyleTableDirectly(OGRStyleTable *poStyleTable);
304
305 virtual void SetStyleTable(OGRStyleTable *poStyleTable);
306
307 virtual OGRErr StartTransaction() CPL_WARN_UNUSED_RESULT;
308 virtual OGRErr CommitTransaction() CPL_WARN_UNUSED_RESULT;
309 virtual OGRErr RollbackTransaction();
310
312 // Keep field definitions in sync with transactions
313 virtual void PrepareStartTransaction();
314 // Rollback TO SAVEPOINT if osSavepointName is not empty, otherwise ROLLBACK
315 virtual void FinishRollbackTransaction(const std::string &osSavepointName);
317
318 virtual const char *GetFIDColumn() const;
319 virtual const char *GetGeometryColumn() const;
320
321 virtual OGRErr SetIgnoredFields(CSLConstList papszFields);
322
323 virtual OGRGeometryTypeCounter *
324 GetGeometryTypes(int iGeomField, int nFlagsGGT, int &nEntryCountOut,
325 GDALProgressFunc pfnProgress, void *pProgressData);
326
327 OGRErr Intersection(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
328 CSLConstList papszOptions = nullptr,
329 GDALProgressFunc pfnProgress = nullptr,
330 void *pProgressArg = nullptr);
331 OGRErr Union(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
332 CSLConstList papszOptions = nullptr,
333 GDALProgressFunc pfnProgress = nullptr,
334 void *pProgressArg = nullptr);
335 OGRErr SymDifference(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
336 CSLConstList papszOptions,
337 GDALProgressFunc pfnProgress, void *pProgressArg);
338 OGRErr Identity(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
339 CSLConstList papszOptions = nullptr,
340 GDALProgressFunc pfnProgress = nullptr,
341 void *pProgressArg = nullptr);
342 OGRErr Update(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
343 CSLConstList papszOptions = nullptr,
344 GDALProgressFunc pfnProgress = nullptr,
345 void *pProgressArg = nullptr);
346 OGRErr Clip(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
347 CSLConstList papszOptions = nullptr,
348 GDALProgressFunc pfnProgress = nullptr,
349 void *pProgressArg = nullptr);
350 OGRErr Erase(OGRLayer *pLayerMethod, OGRLayer *pLayerResult,
351 CSLConstList papszOptions = nullptr,
352 GDALProgressFunc pfnProgress = nullptr,
353 void *pProgressArg = nullptr);
354
355 int Reference();
356 int Dereference();
357 int GetRefCount() const;
359 GIntBig GetFeaturesRead();
361
362 /* non virtual : convenience wrapper for ReorderFields() */
363 OGRErr ReorderField(int iOldFieldPos, int iNewFieldPos);
364
366 int AttributeFilterEvaluationNeedsGeometry();
367
368 /* consider these private */
369 OGRErr InitializeIndexSupport(const char *);
370
371 OGRLayerAttrIndex *GetIndex()
372 {
373 return m_poAttrIndex;
374 }
375
376 int GetGeomFieldFilter() const
377 {
378 return m_iGeomFieldFilter;
379 }
380
381 const char *GetAttrQueryString() const
382 {
383 return m_pszAttrQueryString;
384 }
385
387
390 static inline OGRLayerH ToHandle(OGRLayer *poLayer)
391 {
392 return reinterpret_cast<OGRLayerH>(poLayer);
393 }
394
397 static inline OGRLayer *FromHandle(OGRLayerH hLayer)
398 {
399 return reinterpret_cast<OGRLayer *>(hLayer);
400 }
401
403 bool FilterWKBGeometry(const GByte *pabyWKB, size_t nWKBSize,
404 bool bEnvelopeAlreadySet,
405 OGREnvelope &sEnvelope) const;
406
407 static bool FilterWKBGeometry(const GByte *pabyWKB, size_t nWKBSize,
408 bool bEnvelopeAlreadySet,
409 OGREnvelope &sEnvelope,
410 const OGRGeometry *poFilterGeom,
411 bool bFilterIsEnvelope,
412 const OGREnvelope &sFilterEnvelope,
413 OGRPreparedGeometry *&poPreparedFilterGeom);
415
419 static constexpr const char *DEFAULT_ARROW_FID_NAME = "OGC_FID";
420
424 static constexpr const char *DEFAULT_ARROW_GEOMETRY_NAME = "wkb_geometry";
425
426 protected:
428
429 enum class FieldChangeType : char
430 {
431 ADD_FIELD,
432 ALTER_FIELD,
433 DELETE_FIELD
434 };
435
436 // Store changes to the fields that happened inside a transaction
437 template <typename T> struct FieldDefnChange
438 {
439
440 FieldDefnChange(std::unique_ptr<T> &&poFieldDefnIn, int iFieldIn,
441 FieldChangeType eChangeTypeIn,
442 const std::string &osSavepointNameIn = "")
443 : poFieldDefn(std::move(poFieldDefnIn)), iField(iFieldIn),
444 eChangeType(eChangeTypeIn), osSavepointName(osSavepointNameIn)
445 {
446 }
447
448 std::unique_ptr<T> poFieldDefn;
449 int iField;
450 FieldChangeType eChangeType;
451 std::string osSavepointName;
452 };
453
454 std::vector<FieldDefnChange<OGRFieldDefn>> m_apoFieldDefnChanges{};
455 std::vector<FieldDefnChange<OGRGeomFieldDefn>> m_apoGeomFieldDefnChanges{};
456
457 OGRStyleTable *m_poStyleTable;
458 OGRFeatureQuery *m_poAttrQuery;
459 char *m_pszAttrQueryString;
460 OGRLayerAttrIndex *m_poAttrIndex;
461
462 int m_nRefCount;
463
464 GIntBig m_nFeaturesRead;
466};
467
478inline OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
479{
480 return poLayer->begin();
481}
482
486inline OGRLayer::FeatureIterator end(OGRLayer *poLayer)
487{
488 return poLayer->end();
489}
490
494using OGRLayerUniquePtr = std::unique_ptr<OGRLayer>;
495
496/************************************************************************/
497/* OGRGetNextFeatureThroughRaw */
498/************************************************************************/
499
508template <class BaseLayer> class OGRGetNextFeatureThroughRaw
509{
510 protected:
512
513 public:
517 {
518 const auto poThis = static_cast<BaseLayer *>(this);
519 while (true)
520 {
521 OGRFeature *poFeature = poThis->GetNextRawFeature();
522 if (poFeature == nullptr)
523 return nullptr;
524
525 if ((poThis->m_poFilterGeom == nullptr ||
526 poThis->FilterGeometry(poFeature->GetGeometryRef())) &&
527 (poThis->m_poAttrQuery == nullptr ||
528 poThis->m_poAttrQuery->Evaluate(poFeature)))
529 {
530 return poFeature;
531 }
532 else
533 delete poFeature;
534 }
535 }
536};
537
539#define DEFINE_GET_NEXT_FEATURE_THROUGH_RAW(BaseLayer) \
540 private: \
541 friend class OGRGetNextFeatureThroughRaw<BaseLayer>; \
542 \
543 public: \
544 OGRFeature *GetNextFeature() override \
545 { \
546 return OGRGetNextFeatureThroughRaw<BaseLayer>::GetNextFeature(); \
547 }
548
549/************************************************************************/
550/* OGRDataSource */
551/************************************************************************/
552
572class CPL_DLL OGRDataSource : public GDALDataset
573{
574 public:
576 ~OGRDataSource() override;
577
579 virtual const char *GetName()
580 OGR_DEPRECATED("Use GDALDataset class instead") = 0;
581
582 static void DestroyDataSource(OGRDataSource *)
583 OGR_DEPRECATED("Use GDALDataset class instead");
585};
586
587/************************************************************************/
588/* OGRSFDriver */
589/************************************************************************/
590
609class CPL_DLL OGRSFDriver : public GDALDriver
610{
611 public:
613 ~OGRSFDriver() override;
614
615 virtual const char *GetName()
616 OGR_DEPRECATED("Use GDALDriver class instead") = 0;
617
618 virtual OGRDataSource *Open(const char *pszName, int bUpdate = FALSE)
619 OGR_DEPRECATED("Use GDALDriver class instead") = 0;
620
621 virtual int TestCapability(const char *pszCap)
622 OGR_DEPRECATED("Use GDALDriver class instead") = 0;
623
624 virtual OGRDataSource *CreateDataSource(const char *pszName,
625 char ** = nullptr)
626 OGR_DEPRECATED("Use GDALDriver class instead");
627 virtual OGRErr DeleteDataSource(const char *pszName)
628 OGR_DEPRECATED("Use GDALDriver class instead");
630};
631
632/************************************************************************/
633/* OGRSFDriverRegistrar */
634/************************************************************************/
635
650{
651
654
655 static GDALDataset *OpenWithDriverArg(GDALDriver *poDriver,
656 GDALOpenInfo *poOpenInfo);
657 static GDALDataset *CreateVectorOnly(GDALDriver *poDriver,
658 const char *pszName,
659 CSLConstList papszOptions);
660 static CPLErr DeleteDataSource(GDALDriver *poDriver, const char *pszName);
661
662 public:
664 static OGRSFDriverRegistrar *GetRegistrar()
665 OGR_DEPRECATED("Use GDALDriverManager class instead");
666
667 CPPCHECK_STATIC void RegisterDriver(OGRSFDriver *poDriver)
668 OGR_DEPRECATED("Use GDALDriverManager class instead");
669
670 CPPCHECK_STATIC int GetDriverCount(void)
671 OGR_DEPRECATED("Use GDALDriverManager class instead");
672
673 CPPCHECK_STATIC GDALDriver *GetDriver(int iDriver)
674 OGR_DEPRECATED("Use GDALDriverManager class instead");
675
676 CPPCHECK_STATIC GDALDriver *GetDriverByName(const char *)
677 OGR_DEPRECATED("Use GDALDriverManager class instead");
678
679 CPPCHECK_STATIC int GetOpenDSCount()
680 OGR_DEPRECATED("Use GDALDriverManager class instead");
681
682 CPPCHECK_STATIC OGRDataSource *GetOpenDS(int)
683 OGR_DEPRECATED("Use GDALDriverManager class instead");
685};
686
687/* -------------------------------------------------------------------- */
688/* Various available registration methods. */
689/* -------------------------------------------------------------------- */
691
693void OGRRegisterAllInternal();
694
695void CPL_DLL RegisterOGRFileGDB();
696void DeclareDeferredOGRFileGDBPlugin();
697void CPL_DLL RegisterOGRShape();
698void CPL_DLL RegisterOGRNTF();
699void CPL_DLL RegisterOGRTiger();
700void CPL_DLL RegisterOGRS57();
701void CPL_DLL RegisterOGRTAB();
702void CPL_DLL RegisterOGRMIF();
703void CPL_DLL RegisterOGRODBC();
704void DeclareDeferredOGRODBCPlugin();
705void CPL_DLL RegisterOGRWAsP();
706void CPL_DLL RegisterOGRPG();
707void DeclareDeferredOGRPGPlugin();
708void CPL_DLL RegisterOGRMSSQLSpatial();
709void DeclareDeferredOGRMSSQLSpatialPlugin();
710void CPL_DLL RegisterOGRMySQL();
711void DeclareDeferredOGRMySQLPlugin();
712void CPL_DLL RegisterOGROCI();
713void DeclareDeferredOGROCIPlugin();
714void CPL_DLL RegisterOGRDGN();
715void CPL_DLL RegisterOGRGML();
716void CPL_DLL RegisterOGRLIBKML();
717void DeclareDeferredOGRLIBKMLPlugin();
718void CPL_DLL RegisterOGRKML();
719void CPL_DLL RegisterOGRFlatGeobuf();
720void CPL_DLL RegisterOGRGeoJSON();
721void CPL_DLL RegisterOGRGeoJSONSeq();
722void CPL_DLL RegisterOGRESRIJSON();
723void CPL_DLL RegisterOGRTopoJSON();
724void CPL_DLL RegisterOGRAVCBin();
725void CPL_DLL RegisterOGRAVCE00();
726void CPL_DLL RegisterOGRVRT();
727void CPL_DLL RegisterOGRSQLite();
728void CPL_DLL RegisterOGRCSV();
729void CPL_DLL RegisterOGRILI1();
730void CPL_DLL RegisterOGRILI2();
731void CPL_DLL RegisterOGRPGeo();
732void CPL_DLL RegisterOGRDXF();
733void CPL_DLL RegisterOGRCAD();
734void DeclareDeferredOGRCADPlugin();
735void CPL_DLL RegisterOGRDWG();
736void CPL_DLL RegisterOGRDGNV8();
737void DeclareDeferredOGRDWGPlugin();
738void DeclareDeferredOGRDGNV8Plugin();
739void CPL_DLL RegisterOGRIDB();
740void DeclareDeferredOGRIDBPlugin();
741void CPL_DLL RegisterOGRGMT();
742void CPL_DLL RegisterOGRGPX();
743void CPL_DLL RegisterOGRNAS();
744void CPL_DLL RegisterOGRGeoRSS();
745void CPL_DLL RegisterOGRVFK();
746void DeclareDeferredOGRVFKPlugin();
747void CPL_DLL RegisterOGRPGDump();
748void CPL_DLL RegisterOGROSM();
749void CPL_DLL RegisterOGRGPSBabel();
750void CPL_DLL RegisterOGRPDS();
751void CPL_DLL RegisterOGRWFS();
752void CPL_DLL RegisterOGROAPIF();
753void CPL_DLL RegisterOGRSOSI();
754void DeclareDeferredOGRSOSIPlugin();
755void CPL_DLL RegisterOGREDIGEO();
756void CPL_DLL RegisterOGRIdrisi();
757void CPL_DLL RegisterOGRXLS();
758void DeclareDeferredOGRXLSPlugin();
759void CPL_DLL RegisterOGRODS();
760void CPL_DLL RegisterOGRXLSX();
761void CPL_DLL RegisterOGRElastic();
762void DeclareDeferredOGRElasticPlugin();
763void CPL_DLL RegisterOGRGeoPackage();
764void CPL_DLL RegisterOGRCarto();
765void DeclareDeferredOGRCartoPlugin();
766void CPL_DLL RegisterOGRAmigoCloud();
767void CPL_DLL RegisterOGRSXF();
768void CPL_DLL RegisterOGROpenFileGDB();
769void DeclareDeferredOGROpenFileGDBPlugin();
770void CPL_DLL RegisterOGRSelafin();
771void CPL_DLL RegisterOGRJML();
772void CPL_DLL RegisterOGRPLSCENES();
773void DeclareDeferredOGRPLSCENESPlugin();
774void CPL_DLL RegisterOGRCSW();
775void CPL_DLL RegisterOGRMongoDBv3();
776void DeclareDeferredOGRMongoDBv3Plugin();
777void CPL_DLL RegisterOGRVDV();
778void CPL_DLL RegisterOGRGMLAS();
779void DeclareDeferredOGRGMLASPlugin();
780void CPL_DLL RegisterOGRMVT();
781void CPL_DLL RegisterOGRNGW();
782void CPL_DLL RegisterOGRMapML();
783void CPL_DLL RegisterOGRLVBAG();
784void CPL_DLL RegisterOGRHANA();
785void DeclareDeferredOGRHANAPlugin();
786void CPL_DLL RegisterOGRParquet();
787void DeclareDeferredOGRParquetPlugin();
788void CPL_DLL RegisterOGRArrow();
789void DeclareDeferredOGRArrowPlugin();
790void CPL_DLL RegisterOGRGTFS();
791void CPL_DLL RegisterOGRPMTiles();
792void CPL_DLL RegisterOGRJSONFG();
793void CPL_DLL RegisterOGRMiraMon();
794void CPL_DLL RegisterOGRXODR();
795void DeclareDeferredOGRXODRPlugin();
796void CPL_DLL RegisterOGRADBC();
797void DeclareDeferredOGRADBCPlugin();
798void CPL_DLL RegisterOGRAIVector();
799// @endcond
800
802
803#endif /* ndef OGRSF_FRMTS_H_INCLUDED */
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:476
A set of associated raster bands, usually from one file.
Definition gdal_dataset.h:77
Format specific driver.
Definition gdal_driver.h:63
Object with metadata.
Definition gdal_majorobject.h:43
Class for dataset open functions.
Definition gdal_openinfo.h:30
LEGACY class.
Definition ogrsf_frmts.h:573
Simple container for a bounding region in 3D.
Definition ogr_core.h:217
Simple container for a bounding region (rectangle)
Definition ogr_core.h:44
Definition of a feature class or feature layer.
Definition ogr_feature.h:521
A simple feature, including geometry and attributes.
Definition ogr_feature.h:1041
OGRGeometry * GetGeometryRef()
Fetch pointer to feature geometry.
Definition ogrfeature.cpp:737
Definition of an attribute of an OGRFeatureDefn.
Definition ogr_feature.h:72
Definition of a geometry field of an OGRFeatureDefn.
Definition ogr_feature.h:335
Abstract base class for all geometry classes.
Definition ogr_geometry.h:357
Template class offering a GetNextFeature() implementation relying on GetNextRawFeature().
Definition ogrsf_frmts.h:509
OGRFeature * GetNextFeature()
Implement OGRLayer::GetNextFeature(), relying on BaseLayer::GetNextRawFeature()
Definition ogrsf_frmts.h:516
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61
friend FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:478
virtual OGRFeature * GetNextFeature()=0
Fetch the next available feature from this layer.
std::vector< OGRSpatialReferenceRefCountedPtr > GetSupportedSRSListRetType
Return type of OGRLayer::GetSupportedSRSList()
Definition ogrsf_frmts.h:266
static OGRLayerH ToHandle(OGRLayer *poLayer)
Convert a OGRLayer* to a OGRLayerH.
Definition ogrsf_frmts.h:390
friend FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:486
virtual void ResetReading()=0
Reset feature reading to start on the first feature.
static OGRLayer * FromHandle(OGRLayerH hLayer)
Convert a OGRLayerH to a OGRLayer*.
Definition ogrsf_frmts.h:397
LEGACY class.
Definition ogrsf_frmts.h:650
LEGACY class.
Definition ogrsf_frmts.h:610
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:152
This class represents a style table.
Definition ogr_featurestyle.h:69
CPLErr
Error category / error level.
Definition cpl_error.h:45
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:279
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:275
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition cpl_port.h:1101
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1252
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition cpl_port.h:1035
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:165
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:195
void * OGRLayerH
Opaque type for a layer (OGRLayer)
Definition gdal_fwd.h:157
This file is legacy since GDAL 3.12, but will be kept at least in the whole GDAL 3....
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:423
int OGRErr
Type for a OGR error.
Definition ogr_core.h:388
Simple feature classes.
std::unique_ptr< OGRFeature, OGRFeatureUniquePtrDeleter > OGRFeatureUniquePtr
Unique pointer type for OGRFeature.
Definition ogr_feature.h:1723
Simple feature style classes.
std::unique_ptr< OGRLayer > OGRLayerUniquePtr
Unique pointer type for OGRLayer.
Definition ogrsf_frmts.h:494
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:478
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:486
Result item of OGR_L_GetGeometryTypes.
Definition ogr_api.h:627