Coverage Report

Created: 2026-04-01 06:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/frmts/gdalallregister.cpp
Line
Count
Source
1
/******************************************************************************
2
 *
3
 * Project:  GDAL Core
4
 * Purpose:  Implementation of GDALAllRegister(), primary format registration.
5
 * Author:   Frank Warmerdam, warmerdam@pobox.com
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 1998, Frank Warmerdam
9
 * Copyright (c) 2007-2014, Even Rouault <even dot rouault at spatialys.com>
10
 *
11
 * SPDX-License-Identifier: MIT
12
 ****************************************************************************/
13
14
#include "gdal_priv.h"
15
#include "gdal_frmts.h"
16
#include "ogrsf_frmts.h"
17
18
#ifdef GNM_ENABLED
19
#include "gnm_frmts.h"
20
#endif
21
22
#if defined(HAVE_EXTERNAL_DEFERRED_PLUGINS)
23
// The above define and the below functions are set and generated by
24
// frmts/CMakeLists.txt when a CMake ADD_EXTERNAL_DEFERRED_PLUGIN_XXXX
25
// variable is set.
26
extern "C" void DeclareExternalDeferredPlugins(void);
27
#endif
28
29
extern "C" void CPL_DLL GDALRegister_raw_no_sidecar();
30
extern "C" void CPL_DLL GDALRegister_raw_with_sidecar();
31
32
/************************************************************************/
33
/*                          GDALRegisterPlugin()                        */
34
/*                                                                      */
35
/*      Register a plugin by name, returning an error if not found      */
36
/************************************************************************/
37
38
/**
39
 * \brief Register a plugin by name, returning an error if not found
40
 *
41
 * This function will call GDALDriverManager::LoadPlugin() to register a
42
 * specific plugin by name.
43
 *
44
 * This method is intended to be called instead of GDALAllRegister() or
45
 * GDALRegisterPlugins() when fine tuning which drivers are needed at runtime.
46
 *
47
 * @see GDALDriverManager::LoadPlugin()
48
 * @see GDALDriverManager::AutoLoadDrivers()
49
 * @since GDAL 3.8
50
*/
51
CPLErr GDALRegisterPlugin(const char *name)
52
0
{
53
0
    auto poDriverManager = GetGDALDriverManager();
54
    // LoadPlugin is a no-op if compiled with GDAL_NO_AUTOLOAD defined.
55
0
    return poDriverManager->LoadPlugin(name);
56
0
}
57
58
/************************************************************************/
59
/*                          GDALRegisterPlugins()                       */
60
/*                                                                      */
61
/*      Register drivers and support code available as a plugin.        */
62
/************************************************************************/
63
64
/**
65
 * \brief Register drivers and support code available as a plugin.
66
 *
67
 * This function will call GDALDriverManager::AutoLoadDrivers() to
68
 * register all drivers or supporting code (for example VRT pixelfunctions
69
 * or VSI adapters) that have not been compiled into the GDAL core but instead
70
 * are made available through GDAL's plugin mechanism.
71
 *
72
 * This method is intended to be called instead of GDALAllRegister() when
73
 * fine tuning which drivers are needed at runtime.
74
 *
75
 * @see GDALDriverManager::AutoLoadDrivers()
76
 * @since GDAL 3.8
77
*/
78
void CPL_DLL GDALRegisterPlugins(void)
79
0
{
80
0
    auto poDriverManager = GetGDALDriverManager();
81
    // AutoLoadDrivers is a no-op if compiled with GDAL_NO_AUTOLOAD defined.
82
0
    poDriverManager->AutoLoadDrivers();
83
0
    poDriverManager->AutoLoadPythonDrivers();
84
85
    /* -------------------------------------------------------------------- */
86
    /*      Deregister any drivers explicitly marked as suppressed by the   */
87
    /*      GDAL_SKIP environment variable.                                 */
88
    /* -------------------------------------------------------------------- */
89
0
    poDriverManager->AutoSkipDrivers();
90
91
0
    poDriverManager->ReorderDrivers();
92
0
}
93
94
/************************************************************************/
95
/*                          GDALAllRegister()                           */
96
/*                                                                      */
97
/*      Register all identifiably supported formats.                    */
98
/************************************************************************/
99
100
/**
101
 * Register all known configured GDAL drivers.
102
 *
103
 * This function will drive any of the following that are configured into
104
 * GDAL.  See <a href="http://gdal.org/formats_list.html">raster list</a> and
105
 * <a href="http://gdal.org/ogr_formats.html">vector full list</a>
106
 *
107
 * This function should generally be called once at the beginning of the
108
 * application.
109
 */
110
111
void CPL_STDCALL GDALAllRegister()
112
113
0
{
114
0
    auto poDriverManager = GetGDALDriverManager();
115
116
#if defined(HAVE_EXTERNAL_DEFERRED_PLUGINS)
117
    DeclareExternalDeferredPlugins();
118
#endif
119
120
#if defined(DEFERRED_ARROW_DRIVER)
121
    DeclareDeferredOGRArrowPlugin();
122
#endif
123
#if defined(DEFERRED_BASISU_KTX2_DRIVER)
124
    DeclareDeferredBASISU_KTX2Plugin();
125
#endif
126
#if defined(DEFERRED_CAD_DRIVER)
127
    DeclareDeferredOGRCADPlugin();
128
#endif
129
#if defined(DEFERRED_CARTO_DRIVER)
130
    DeclareDeferredOGRCartoPlugin();
131
#endif
132
#if defined(DEFERRED_DDS_DRIVER)
133
    DeclareDeferredDDSPlugin();
134
#endif
135
#if defined(DEFERRED_DWG_DRIVER)
136
    DeclareDeferredOGRDWGPlugin();
137
    DeclareDeferredOGRDGNV8Plugin();
138
#endif
139
#if defined(DEFERRED_ELASTIC_DRIVER)
140
    DeclareDeferredOGRElasticPlugin();
141
#endif
142
#if defined(DEFERRED_EXR_DRIVER)
143
    DeclareDeferredEXRPlugin();
144
#endif
145
#if defined(DEFERRED_ECW_DRIVER)
146
    DeclareDeferredECWPlugin();
147
#endif
148
#if defined(DEFERRED_FILEGDB_DRIVER)
149
    DeclareDeferredOGRFileGDBPlugin();
150
#endif
151
#if defined(DEFERRED_FITS_DRIVER)
152
    DeclareDeferredFITSPlugin();
153
#endif
154
#if defined(DEFERRED_GEOR_DRIVER)
155
    DeclareDeferredGEORPlugin();
156
#endif
157
#if defined(DEFERRED_GIF_DRIVER)
158
    DeclareDeferredGIFPlugin();
159
#endif
160
#if defined(DEFERRED_GMLAS_DRIVER)
161
    DeclareDeferredOGRGMLASPlugin();
162
#endif
163
#if defined(DEFERRED_GRIB_DRIVER)
164
    DeclareDeferredGRIBPlugin();
165
#endif
166
#if defined(DEFERRED_GTA_DRIVER)
167
    DeclareDeferredGTAPlugin();
168
#endif
169
#if defined(DEFERRED_HANA_DRIVER)
170
    DeclareDeferredOGRHANAPlugin();
171
#endif
172
#if defined(DEFERRED_AVIF_DRIVER)
173
    DeclareDeferredAVIFPlugin();
174
#endif
175
#if defined(DEFERRED_HEIF_DRIVER)
176
    DeclareDeferredHEIFPlugin();
177
#endif
178
#if defined(DEFERRED_HDF4_DRIVER)
179
    DeclareDeferredHDF4Plugin();
180
#endif
181
#if defined(DEFERRED_KEA_DRIVER)
182
    // Must be registered before HDF5 so that when the plugin is not
183
    // installer the proper suggestion message is displayed
184
    DeclareDeferredKEAPlugin();
185
#endif
186
#if defined(DEFERRED_HDF5_DRIVER)
187
    DeclareDeferredHDF5Plugin();
188
#endif
189
#if defined(DEFERRED_IDB_DRIVER)
190
    DeclareDeferredOGRIDBPlugin();
191
#endif
192
#if defined(DEFERRED_JP2Grok_DRIVER)
193
    DeclareDeferredJP2GrokPlugin();
194
#endif
195
#if defined(DEFERRED_JP2KAK_DRIVER)
196
    DeclareDeferredJP2KAKPlugin();
197
#endif
198
#if defined(DEFERRED_JP2OPENJPEG_DRIVER)
199
    DeclareDeferredOPENJPEGPlugin();
200
#endif
201
#if defined(DEFERRED_JPEG_DRIVER)
202
    DeclareDeferredJPEGPlugin();
203
#endif
204
#if defined(DEFERRED_JPEGXL_DRIVER)
205
    DeclareDeferredJPEGXLPlugin();
206
#endif
207
#if defined(DEFERRED_JPIPKAK_DRIVER)
208
    DeclareDeferredJPIPKAKPlugin();
209
#endif
210
#if defined(DEFERRED_LIBKML_DRIVER)
211
    DeclareDeferredOGRLIBKMLPlugin();
212
#endif
213
#if defined(DEFERRED_MONGODBV3_DRIVER)
214
    DeclareDeferredOGRMongoDBv3Plugin();
215
#endif
216
#if defined(DEFERRED_MRF_DRIVER)
217
    DeclareDeferredMRFPlugin();
218
#endif
219
#if defined(DEFERRED_MRSID_DRIVER)
220
    DeclareDeferredMrSIDPlugin();
221
#endif
222
#if defined(DEFERRED_MSG_DRIVER)
223
    DeclareDeferredMSGPlugin();
224
#endif
225
#if defined(DEFERRED_MSSQLSPATIAL_DRIVER)
226
    DeclareDeferredOGRMSSQLSpatialPlugin();
227
#endif
228
#if defined(DEFERRED_MYSQL_DRIVER)
229
    DeclareDeferredOGRMySQLPlugin();
230
#endif
231
#if defined(DEFERRED_NETCDF_DRIVER)
232
    DeclareDeferredNetCDFPlugin();
233
#endif
234
#if defined(DEFERRED_NITF_DRIVER)
235
    DeclareDeferredNITFPlugin();
236
#endif
237
#if defined(DEFERRED_OCI_DRIVER)
238
    DeclareDeferredOGROCIPlugin();
239
#endif
240
#if defined(DEFERRED_ODBC_DRIVER)
241
    DeclareDeferredOGRODBCPlugin();
242
#endif
243
#if defined(DEFERRED_OGDI_DRIVER)
244
    DeclareDeferredOGROGDIPlugin();
245
#endif
246
#if defined(DEFERRED_OPENFILEGDB_DRIVER)
247
    DeclareDeferredOGROpenFileGDBPlugin();
248
#endif
249
#if defined(DEFERRED_PARQUET_DRIVER)
250
    DeclareDeferredOGRParquetPlugin();
251
#endif
252
#if defined(DEFERRED_PCIDSK_DRIVER)
253
    DeclareDeferredPCIDSKPlugin();
254
#endif
255
#if defined(DEFERRED_PCRASTER_DRIVER)
256
    DeclareDeferredPCRasterPlugin();
257
#endif
258
#if defined(DEFERRED_POSTGISRASTER_DRIVER)
259
    DeclareDeferredPostGISRasterPlugin();
260
#endif
261
#if defined(DEFERRED_PLSCENES_DRIVER)
262
    DeclareDeferredOGRPLSCENESPlugin();
263
#endif
264
#if defined(DEFERRED_PDF_DRIVER)
265
    DeclareDeferredPDFPlugin();
266
#endif
267
#if defined(DEFERRED_PDS_DRIVER)
268
    DeclareDeferredPDSPlugin();
269
#endif
270
#if defined(DEFERRED_PG_DRIVER)
271
    DeclareDeferredOGRPGPlugin();
272
#endif
273
#if defined(DEFERRED_PNG_DRIVER)
274
    DeclareDeferredPNGPlugin();
275
#endif
276
#if defined(DEFERRED_RASTERLITE_DRIVER)
277
    DeclareDeferredRasterlitePlugin();
278
#endif
279
#if defined(DEFERRED_SOSI_DRIVER)
280
    DeclareDeferredOGRSOSIPlugin();
281
#endif
282
#if defined(DEFERRED_TILEDB_DRIVER)
283
    DeclareDeferredTileDBPlugin();
284
#endif
285
#if defined(DEFERRED_VFK_DRIVER)
286
    DeclareDeferredOGRVFKPlugin();
287
#endif
288
#if defined(DEFERRED_WCS_DRIVER)
289
    DeclareDeferredWCSPlugin();
290
#endif
291
#if defined(DEFERRED_WEBP_DRIVER)
292
    DeclareDeferredWEBPPlugin();
293
#endif
294
#if defined(DEFERRED_WMS_DRIVER)
295
    DeclareDeferredWMSPlugin();
296
#endif
297
#if defined(DEFERRED_WMTS_DRIVER)
298
    DeclareDeferredWMTSPlugin();
299
#endif
300
#if defined(DEFERRED_XLS_DRIVER)
301
    DeclareDeferredOGRXLSPlugin();
302
#endif
303
#if defined(DEFERRED_ZARR_DRIVER)
304
    DeclareDeferredZarrPlugin();
305
#endif
306
#if defined(DEFERRED_XODR_DRIVER)
307
    DeclareDeferredOGRXODRPlugin();
308
#endif
309
#if defined(DEFERRED_ADBC_DRIVER)
310
    DeclareDeferredOGRADBCPlugin();
311
#endif
312
313
    // AutoLoadDrivers is a no-op if compiled with GDAL_NO_AUTOLOAD defined.
314
0
    poDriverManager->AutoLoadDrivers();
315
316
    // NOTE: frmts/drivers.ini in the same directory should be kept in same
317
    // order as this file
318
319
#ifdef FRMT_derived
320
    GDALRegister_Derived();
321
#endif
322
323
#ifdef FRMT_gti
324
    GDALRegister_GTI();
325
#endif
326
327
#ifdef FRMT_snap_tiff
328
    GDALRegister_SNAP_TIFF();
329
#endif
330
331
0
#ifdef FRMT_gtiff
332
0
    GDALRegister_GTiff();
333
0
    GDALRegister_COG();
334
0
#endif
335
336
#ifdef FRMT_libertiff
337
    GDALRegister_LIBERTIFF();
338
#endif
339
340
    // VRT needs to be registered after GeoTIFF as it queries its metadata
341
0
#ifdef FRMT_vrt
342
0
    GDALRegister_VRT();
343
0
#endif
344
345
#ifdef FRMT_nitf
346
    GDALRegister_NITF();
347
    GDALRegister_RPFTOC();
348
    GDALRegister_ECRGTOC();
349
#endif
350
351
#ifdef FRMT_hfa
352
    GDALRegister_HFA();
353
#endif
354
355
#ifdef FRMT_ceos2
356
    GDALRegister_SAR_CEOS();
357
#endif
358
359
#ifdef FRMT_ceos
360
    GDALRegister_CEOS();
361
#endif
362
363
#ifdef FRMT_jaxapalsar
364
    GDALRegister_PALSARJaxa();
365
#endif
366
367
#ifdef FRMT_gff
368
    GDALRegister_GFF();
369
#endif
370
371
#ifdef FRMT_esric
372
    GDALRegister_ESRIC();
373
#endif
374
375
#ifdef FRMT_aigrid
376
    //    GDALRegister_AIGrid2();
377
    GDALRegister_AIGrid();
378
#endif
379
380
#ifdef FRMT_aaigrid
381
    GDALRegister_AAIGrid();
382
    GDALRegister_GRASSASCIIGrid();
383
    GDALRegister_ISG();
384
#endif
385
386
#ifdef FRMT_dted
387
    GDALRegister_DTED();
388
#endif
389
390
#ifdef FRMT_png
391
    GDALRegister_PNG();
392
#endif
393
394
#ifdef FRMT_dds
395
    GDALRegister_DDS();
396
#endif
397
398
#ifdef FRMT_gta
399
    GDALRegister_GTA();
400
#endif
401
402
#ifdef FRMT_jpeg
403
    GDALRegister_JPEG();
404
#endif
405
406
0
#ifdef FRMT_mem
407
0
    GDALRegister_MEM();
408
0
#endif
409
410
#ifdef FRMT_jdem
411
    GDALRegister_JDEM();
412
#endif
413
414
#ifdef FRMT_gif
415
    GDALRegister_GIF();
416
    GDALRegister_BIGGIF();
417
#endif
418
419
#ifdef FRMT_envisat
420
    GDALRegister_Envisat();
421
#endif
422
423
#ifdef FRMT_fits
424
    GDALRegister_FITS();
425
#endif
426
427
#ifdef FRMT_bsb
428
    GDALRegister_BSB();
429
#endif
430
431
#ifdef FRMT_bmp
432
    GDALRegister_BMP();
433
#endif
434
435
#ifdef FRMT_dimap
436
    GDALRegister_DIMAP();
437
#endif
438
439
#ifdef FRMT_airsar
440
    GDALRegister_AirSAR();
441
#endif
442
443
#ifdef FRMT_rs2
444
    GDALRegister_RS2();
445
#endif
446
447
#ifdef FRMT_safe
448
    GDALRegister_SAFE();
449
#endif
450
451
#ifdef FRMT_pcidsk
452
    GDALRegister_PCIDSK();
453
#endif
454
455
#ifdef FRMT_pcraster
456
    GDALRegister_PCRaster();
457
#endif
458
459
#ifdef FRMT_ilwis
460
    GDALRegister_ILWIS();
461
#endif
462
463
#ifdef FRMT_srtmhgt
464
    GDALRegister_SRTMHGT();
465
#endif
466
467
#ifdef FRMT_leveller
468
    GDALRegister_Leveller();
469
#endif
470
471
#ifdef FRMT_terragen
472
    GDALRegister_Terragen();
473
#endif
474
475
#ifdef FRMT_netcdf
476
    GDALRegister_netCDF();
477
#endif
478
479
#ifdef FRMT_hdf4
480
    GDALRegister_HDF4();
481
    GDALRegister_HDF4Image();
482
#endif
483
484
#ifdef FRMT_pds
485
    GDALRegister_ISIS3();
486
    GDALRegister_ISIS2();
487
    GDALRegister_PDS();
488
    GDALRegister_PDS4();
489
    GDALRegister_VICAR();
490
#endif
491
492
#ifdef FRMT_til
493
    GDALRegister_TIL();
494
#endif
495
496
#ifdef FRMT_ers
497
    GDALRegister_ERS();
498
#endif
499
500
#ifdef FRMT_jp2grok
501
    GDALRegister_JP2Grok();
502
#endif
503
504
#ifdef FRMT_jp2kak
505
    // JPEG2000 support using Kakadu toolkit
506
    GDALRegister_JP2KAK();
507
#endif
508
509
#ifdef FRMT_jpipkak
510
    // JPEG2000 support using Kakadu toolkit
511
    GDALRegister_JPIPKAK();
512
#endif
513
514
#ifdef FRMT_ecw
515
    GDALRegister_ECW();
516
    GDALRegister_JP2ECW();
517
#endif
518
519
#ifdef FRMT_openjpeg
520
    // JPEG2000 support using OpenJPEG library
521
    GDALRegister_JP2OpenJPEG();
522
#endif
523
524
#ifdef FRMT_l1b
525
    GDALRegister_L1B();
526
#endif
527
528
#ifdef FRMT_grib
529
    GDALRegister_GRIB();
530
#endif
531
532
#ifdef FRMT_mrsid
533
    GDALRegister_MrSID();
534
#endif
535
536
#ifdef FRMT_rmf
537
    GDALRegister_RMF();
538
#endif
539
540
#ifdef FRMT_wcs
541
    GDALRegister_WCS();
542
#endif
543
544
#ifdef FRMT_wms
545
    GDALRegister_WMS();
546
#endif
547
548
#ifdef FRMT_msgn
549
    GDALRegister_MSGN();
550
#endif
551
552
#ifdef FRMT_msg
553
    GDALRegister_MSG();
554
#endif
555
556
#ifdef FRMT_idrisi
557
    GDALRegister_IDRISI();
558
#endif
559
560
#ifdef FRMT_gsg
561
    GDALRegister_GSAG();
562
    GDALRegister_GSBG();
563
    GDALRegister_GS7BG();
564
#endif
565
566
#ifdef FRMT_cosar
567
    GDALRegister_COSAR();
568
#endif
569
570
#ifdef FRMT_tsx
571
    GDALRegister_TSX();
572
#endif
573
574
#ifdef FRMT_coasp
575
    GDALRegister_COASP();
576
#endif
577
578
#ifdef FRMT_map
579
    GDALRegister_MAP();
580
#endif
581
582
#ifdef FRMT_kmlsuperoverlay
583
    GDALRegister_KMLSUPEROVERLAY();
584
#endif
585
586
#ifdef FRMT_webp
587
    GDALRegister_WEBP();
588
#endif
589
590
#ifdef FRMT_pdf
591
    GDALRegister_PDF();
592
#endif
593
594
#ifdef FRMT_mbtiles
595
    GDALRegister_MBTiles();
596
#endif
597
598
#ifdef FRMT_plmosaic
599
    GDALRegister_PLMOSAIC();
600
#endif
601
602
#ifdef FRMT_cals
603
    GDALRegister_CALS();
604
#endif
605
606
#ifdef FRMT_wmts
607
    GDALRegister_WMTS();
608
#endif
609
610
#ifdef FRMT_sentinel2
611
    GDALRegister_SENTINEL2();
612
#endif
613
614
#ifdef FRMT_mrf
615
    GDALRegister_MRF();
616
#endif
617
618
#ifdef FRMT_tiledb
619
    GDALRegister_TileDB();
620
#endif
621
622
#ifdef FRMT_rdb
623
    GDALRegister_RDB();
624
#endif
625
    /* -------------------------------------------------------------------- */
626
    /*      Put raw formats at the end of the list. These drivers support   */
627
    /*      various ASCII-header labeled formats, so the driver could be    */
628
    /*      confused if you have files in some of above formats and such    */
629
    /*      ASCII-header in the same directory.                             */
630
    /* -------------------------------------------------------------------- */
631
632
#ifdef FRMT_raw
633
    GDALRegister_raw_no_sidecar();
634
#endif
635
636
    /* -------------------------------------------------------------------- */
637
    /*      Our test for the following is weak or expensive so we try       */
638
    /*      them last.                                                      */
639
    /* -------------------------------------------------------------------- */
640
641
#ifdef FRMT_rik
642
    GDALRegister_RIK();
643
#endif
644
645
#ifdef FRMT_usgsdem
646
    GDALRegister_USGSDEM();
647
#endif
648
649
#ifdef FRMT_gxf
650
    GDALRegister_GXF();
651
#endif
652
653
/* Register KEA before HDF5 */
654
#ifdef FRMT_kea
655
    GDALRegister_KEA();
656
#endif
657
658
#ifdef FRMT_hdf5
659
    GDALRegister_BAG();
660
    GDALRegister_S102();
661
    GDALRegister_S104();
662
    GDALRegister_S111();
663
    GDALRegister_HDF5();
664
    GDALRegister_HDF5Image();
665
#endif
666
667
#ifdef FRMT_northwood
668
    GDALRegister_NWT_GRD();
669
    GDALRegister_NWT_GRC();
670
#endif
671
672
#ifdef FRMT_adrg
673
    GDALRegister_ADRG();
674
    GDALRegister_SRP();
675
#endif
676
677
#ifdef FRMT_georaster
678
    GDALRegister_GEOR();
679
#endif
680
681
#ifdef FRMT_postgisraster
682
    GDALRegister_PostGISRaster();
683
#endif
684
685
#ifdef FRMT_saga
686
    GDALRegister_SAGA();
687
#endif
688
689
#ifdef FRMT_xyz
690
    GDALRegister_XYZ();
691
#endif
692
693
#ifdef FRMT_hf2
694
    GDALRegister_HF2();
695
#endif
696
697
#ifdef FRMT_ctg
698
    GDALRegister_CTG();
699
#endif
700
701
#ifdef FRMT_zmap
702
    GDALRegister_ZMap();
703
#endif
704
705
#ifdef FRMT_ngsgeoid
706
    GDALRegister_NGSGEOID();
707
#endif
708
709
#ifdef FRMT_iris
710
    GDALRegister_IRIS();
711
#endif
712
713
#ifdef FRMT_prf
714
    GDALRegister_PRF();
715
#endif
716
717
#ifdef FRMT_eeda
718
    GDALRegister_EEDAI();
719
    GDALRegister_EEDA();
720
#endif
721
722
#ifdef FRMT_daas
723
    GDALRegister_DAAS();
724
#endif
725
726
#ifdef FRMT_null
727
    GDALRegister_NULL();
728
#endif
729
730
#ifdef FRMT_sigdem
731
    GDALRegister_SIGDEM();
732
#endif
733
734
#ifdef FRMT_exr
735
    GDALRegister_EXR();
736
#endif
737
738
#ifdef FRMT_avif
739
    GDALRegister_AVIF();
740
#endif
741
742
#ifdef FRMT_heif
743
    GDALRegister_HEIF();
744
#endif
745
746
#ifdef FRMT_tga
747
    GDALRegister_TGA();
748
#endif
749
750
#ifdef FRMT_ogcapi
751
    GDALRegister_OGCAPI();
752
#endif
753
754
#ifdef FRMT_stacta
755
    GDALRegister_STACTA();
756
#endif
757
758
#ifdef FRMT_stacit
759
    GDALRegister_STACIT();
760
#endif
761
762
#ifdef FRMT_jpegxl
763
    GDALRegister_JPEGXL();
764
#endif
765
766
#ifdef FRMT_basisu_ktx2
767
    GDALRegister_BASISU();
768
    GDALRegister_KTX2();
769
#endif
770
771
#ifdef FRMT_gdalg
772
    GDALRegister_GDALG();
773
#endif
774
775
#ifdef FRMT_e57
776
    GDALRegister_E57();
777
#endif
778
779
    // NOTE: you need to generally insert your own driver before that line.
780
781
    // NOTE: frmts/drivers.ini in the same directory should be kept in same
782
    // order as this file
783
784
/* -------------------------------------------------------------------- */
785
/*     GNM and OGR drivers                                              */
786
/* -------------------------------------------------------------------- */
787
0
#ifdef GNM_ENABLED
788
0
    GNMRegisterAllInternal();
789
0
#endif
790
791
0
    OGRRegisterAllInternal();
792
793
    /* -------------------------------------------------------------------- */
794
    /*      Put here drivers that absolutely need to look for side car      */
795
    /*      files in their Identify()/Open() procedure.                     */
796
    /* -------------------------------------------------------------------- */
797
798
#ifdef FRMT_raw
799
    GDALRegister_raw_with_sidecar();
800
#endif
801
802
#ifdef FRMT_zarr
803
    GDALRegister_Zarr();
804
#endif
805
806
#ifdef FRMT_rcm
807
    GDALRegister_RCM();
808
#endif
809
810
#ifdef FRMT_miramon
811
    GDALRegister_MiraMon();
812
#endif
813
814
/* -------------------------------------------------------------------- */
815
/*      Register GDAL HTTP last, to let a chance to other drivers       */
816
/*      accepting URL to handle them before.                            */
817
/* -------------------------------------------------------------------- */
818
#ifdef FRMT_http
819
    GDALRegister_HTTP();
820
#endif
821
822
0
    poDriverManager->AutoLoadPythonDrivers();
823
824
    /* -------------------------------------------------------------------- */
825
    /*      Deregister any drivers explicitly marked as suppressed by the   */
826
    /*      GDAL_SKIP environment variable.                                 */
827
    /* -------------------------------------------------------------------- */
828
0
    poDriverManager->AutoSkipDrivers();
829
830
0
    poDriverManager->ReorderDrivers();
831
0
}