1 : /******************************************************************************
2 : * $Id: gdalallregister.cpp 23473 2011-12-05 22:17:02Z rouault $
3 : *
4 : * Project: GDAL Core
5 : * Purpose: Implementation of GDALAllRegister(), primary format registration.
6 : * Author: Frank Warmerdam, warmerdam@pobox.com
7 : *
8 : ******************************************************************************
9 : * Copyright (c) 1998, Frank Warmerdam
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 : #include "gdal_priv.h"
31 : #include "gdal_frmts.h"
32 :
33 : CPL_CVSID("$Id: gdalallregister.cpp 23473 2011-12-05 22:17:02Z rouault $");
34 :
35 : #ifdef notdef
36 : // we may have a use for this some day
37 : static char *szConfiguredFormats = "GDAL_FORMATS";
38 : #endif
39 :
40 : /************************************************************************/
41 : /* GDALAllRegister() */
42 : /* */
43 : /* Register all identifiably supported formats. */
44 : /************************************************************************/
45 :
46 : /**
47 : * Register all known configured GDAL drivers.
48 : *
49 : * This function will drive any of the following that are configured into
50 : * GDAL. Many others as well haven't been updated in this
51 : * documentation (see <a href="http://gdal.org/formats_list.html">full list</a>):
52 : *
53 : * <ul>
54 : * <li> GeoTIFF (GTiff)
55 : * <li> Geosoft GXF (GXF)
56 : * <li> Erdas Imagine (HFA)
57 : * <li> CEOS (CEOS)
58 : * <li> ELAS (ELAS)
59 : * <li> Arc/Info Binary Grid (AIGrid)
60 : * <li> SDTS Raster DEM (SDTS)
61 : * <li> OGDI (OGDI)
62 : * <li> ESRI Labelled BIL (EHdr)
63 : * <li> PCI .aux Labelled Raw Raster (PAux)
64 : * <li> HDF4 Hierachal Data Format Release 4
65 : * <li> HDF5 Hierachal Data Format Release 5
66 : * <li> GSAG Golden Software ASCII Grid
67 : * <li> GSBG Golden Software Binary Grid
68 : * </ul>
69 : *
70 : * This function should generally be called once at the beginning of the application.
71 : */
72 :
73 558 : void CPL_STDCALL GDALAllRegister()
74 :
75 : {
76 558 : GetGDALDriverManager()->AutoLoadDrivers();
77 :
78 : #ifdef FRMT_vrt
79 558 : GDALRegister_VRT();
80 : #endif
81 :
82 : #ifdef FRMT_gdb
83 : GDALRegister_GDB();
84 : #endif
85 :
86 : #ifdef FRMT_gtiff
87 558 : GDALRegister_GTiff();
88 : #endif
89 :
90 : #ifdef FRMT_nitf
91 558 : GDALRegister_NITF();
92 558 : GDALRegister_RPFTOC();
93 558 : GDALRegister_ECRGTOC();
94 : #endif
95 :
96 : #ifdef FRMT_hfa
97 558 : GDALRegister_HFA();
98 : #endif
99 :
100 : #ifdef FRMT_ceos2
101 558 : GDALRegister_SAR_CEOS();
102 : #endif
103 :
104 : #ifdef FRMT_ceos
105 558 : GDALRegister_CEOS();
106 : #endif
107 :
108 : #ifdef FRMT_jaxapalsar
109 558 : GDALRegister_PALSARJaxa();
110 : #endif
111 :
112 : #ifdef FRMT_gff
113 558 : GDALRegister_GFF();
114 : #endif
115 :
116 : #ifdef FRMT_elas
117 558 : GDALRegister_ELAS();
118 : #endif
119 :
120 : #ifdef FRMT_aigrid
121 : // GDALRegister_AIGrid2();
122 558 : GDALRegister_AIGrid();
123 : #endif
124 :
125 : #ifdef FRMT_aaigrid
126 558 : GDALRegister_AAIGrid();
127 558 : GDALRegister_GRASSASCIIGrid();
128 : #endif
129 :
130 : #ifdef FRMT_sdts
131 558 : GDALRegister_SDTS();
132 : #endif
133 :
134 : #ifdef FRMT_ogdi
135 558 : GDALRegister_OGDI();
136 : #endif
137 :
138 : #ifdef FRMT_dted
139 558 : GDALRegister_DTED();
140 : #endif
141 :
142 : #ifdef FRMT_png
143 558 : GDALRegister_PNG();
144 : #endif
145 :
146 : #ifdef FRMT_gta
147 558 : GDALRegister_GTA();
148 : #endif
149 :
150 : #ifdef FRMT_jpeg
151 558 : GDALRegister_JPEG();
152 : #endif
153 :
154 : #ifdef FRMT_mem
155 558 : GDALRegister_MEM();
156 : #endif
157 :
158 : #ifdef FRMT_jdem
159 558 : GDALRegister_JDEM();
160 : #endif
161 :
162 : #ifdef FRMT_rasdaman
163 558 : GDALRegister_RASDAMAN();
164 : #endif
165 :
166 : #ifdef FRMT_gif
167 558 : GDALRegister_GIF();
168 558 : GDALRegister_BIGGIF();
169 : #endif
170 :
171 : #ifdef FRMT_envisat
172 558 : GDALRegister_Envisat();
173 : #endif
174 :
175 : #ifdef FRMT_fits
176 558 : GDALRegister_FITS();
177 : #endif
178 :
179 : #ifdef FRMT_bsb
180 558 : GDALRegister_BSB();
181 : #endif
182 :
183 : #ifdef FRMT_xpm
184 558 : GDALRegister_XPM();
185 : #endif
186 :
187 : #ifdef FRMT_bmp
188 558 : GDALRegister_BMP();
189 : #endif
190 :
191 : #ifdef FRMT_dimap
192 558 : GDALRegister_DIMAP();
193 : #endif
194 :
195 : #ifdef FRMT_airsar
196 558 : GDALRegister_AirSAR();
197 : #endif
198 :
199 : #ifdef FRMT_rs2
200 558 : GDALRegister_RS2();
201 : #endif
202 :
203 : #ifdef FRMT_pcidsk
204 558 : GDALRegister_PCIDSK();
205 : #endif
206 :
207 : #ifdef FRMT_pcraster
208 558 : GDALRegister_PCRaster();
209 : #endif
210 :
211 : #ifdef FRMT_ilwis
212 558 : GDALRegister_ILWIS();
213 : #endif
214 :
215 : #ifdef FRMT_sgi
216 558 : GDALRegister_SGI();
217 : #endif
218 :
219 : #ifdef FRMT_srtmhgt
220 558 : GDALRegister_SRTMHGT();
221 : #endif
222 :
223 : #ifdef FRMT_leveller
224 558 : GDALRegister_Leveller();
225 : #endif
226 :
227 : #ifdef FRMT_terragen
228 558 : GDALRegister_Terragen();
229 : #endif
230 :
231 : #ifdef FRMT_netcdf
232 558 : GDALRegister_GMT();
233 558 : GDALRegister_netCDF();
234 : #endif
235 :
236 : #ifdef FRMT_hdf4
237 558 : GDALRegister_HDF4();
238 558 : GDALRegister_HDF4Image();
239 : #endif
240 :
241 : #ifdef FRMT_pds
242 558 : GDALRegister_ISIS3();
243 558 : GDALRegister_ISIS2();
244 558 : GDALRegister_PDS();
245 : #endif
246 :
247 : #ifdef FRMT_til
248 558 : GDALRegister_TIL();
249 : #endif
250 :
251 : #ifdef FRMT_ers
252 558 : GDALRegister_ERS();
253 : #endif
254 :
255 : #ifdef FRMT_jp2kak
256 : // JPEG2000 support using Kakadu toolkit
257 : GDALRegister_JP2KAK();
258 : #endif
259 :
260 : #ifdef FRMT_jpipkak
261 : // JPEG2000 support using Kakadu toolkit
262 : GDALRegister_JPIPKAK();
263 : #endif
264 :
265 : #ifdef FRMT_ecw
266 558 : GDALRegister_ECW();
267 558 : GDALRegister_JP2ECW();
268 : #endif
269 :
270 : #ifdef FRMT_openjpeg
271 : // JPEG2000 support using OpenJPEG library
272 558 : GDALRegister_JP2OpenJPEG();
273 : #endif
274 :
275 : #ifdef FRMT_jpeg2000
276 : // JPEG2000 support using JasPer toolkit
277 : // This one should always be placed after other JasPer supported formats,
278 : // such as BMP or PNM. In other case we will get bad side effects.
279 558 : GDALRegister_JPEG2000();
280 : #endif
281 :
282 : #ifdef FRMT_l1b
283 558 : GDALRegister_L1B();
284 : #endif
285 :
286 : #ifdef FRMT_fit
287 558 : GDALRegister_FIT();
288 : #endif
289 :
290 : #ifdef FRMT_grib
291 558 : GDALRegister_GRIB();
292 : #endif
293 :
294 : #ifdef FRMT_mrsid
295 558 : GDALRegister_MrSID();
296 : #endif
297 :
298 : #ifdef FRMT_mrsid_lidar
299 558 : GDALRegister_MG4Lidar();
300 : #endif
301 :
302 : #ifdef FRMT_rmf
303 558 : GDALRegister_RMF();
304 : #endif
305 :
306 : #ifdef FRMT_wcs
307 558 : GDALRegister_WCS();
308 : #endif
309 :
310 : #ifdef FRMT_wms
311 558 : GDALRegister_WMS();
312 : #endif
313 :
314 : #ifdef FRMT_sde
315 : GDALRegister_SDE();
316 : #endif
317 :
318 : #ifdef FRMT_msgn
319 558 : GDALRegister_MSGN();
320 : #endif
321 :
322 : #ifdef FRMT_msg
323 : GDALRegister_MSG();
324 : #endif
325 :
326 : #ifdef FRMT_idrisi
327 558 : GDALRegister_IDRISI();
328 : #endif
329 :
330 : #ifdef FRMT_ingr
331 558 : GDALRegister_INGR();
332 : #endif
333 :
334 : #ifdef FRMT_gsg
335 558 : GDALRegister_GSAG();
336 558 : GDALRegister_GSBG();
337 558 : GDALRegister_GS7BG();
338 : #endif
339 :
340 : #ifdef FRMT_cosar
341 558 : GDALRegister_COSAR();
342 : #endif
343 :
344 : #ifdef FRMT_tsx
345 558 : GDALRegister_TSX();
346 : #endif
347 :
348 : #ifdef FRMT_coasp
349 558 : GDALRegister_COASP();
350 : #endif
351 :
352 : #ifdef FRMT_tms
353 : GDALRegister_TMS();
354 : #endif
355 :
356 : #ifdef FRMT_r
357 558 : GDALRegister_R();
358 : #endif
359 :
360 : /* -------------------------------------------------------------------- */
361 : /* Put raw formats at the end of the list. These drivers support */
362 : /* various ASCII-header labeled formats, so the driver could be */
363 : /* confused if you have files in some of above formats and such */
364 : /* ASCII-header in the same directory. */
365 : /* -------------------------------------------------------------------- */
366 :
367 : #ifdef FRMT_raw
368 558 : GDALRegister_PNM();
369 558 : GDALRegister_DOQ1();
370 558 : GDALRegister_DOQ2();
371 558 : GDALRegister_ENVI();
372 558 : GDALRegister_EHdr();
373 558 : GDALRegister_GenBin();
374 558 : GDALRegister_PAux();
375 558 : GDALRegister_MFF();
376 558 : GDALRegister_HKV();
377 558 : GDALRegister_FujiBAS();
378 558 : GDALRegister_GSC();
379 558 : GDALRegister_FAST();
380 558 : GDALRegister_BT();
381 558 : GDALRegister_LAN();
382 558 : GDALRegister_CPG();
383 558 : GDALRegister_IDA();
384 558 : GDALRegister_NDF();
385 558 : GDALRegister_EIR();
386 558 : GDALRegister_DIPEx();
387 558 : GDALRegister_LCP();
388 558 : GDALRegister_GTX();
389 558 : GDALRegister_LOSLAS();
390 558 : GDALRegister_NTv2();
391 558 : GDALRegister_ACE2();
392 558 : GDALRegister_SNODAS();
393 : #endif
394 :
395 : /* -------------------------------------------------------------------- */
396 : /* Our test for the following is weak or expensive so we try */
397 : /* them last. */
398 : /* -------------------------------------------------------------------- */
399 :
400 : #ifdef FRMT_rik
401 558 : GDALRegister_RIK();
402 : #endif
403 :
404 : #ifdef FRMT_usgsdem
405 558 : GDALRegister_USGSDEM();
406 : #endif
407 :
408 : #ifdef FRMT_gxf
409 558 : GDALRegister_GXF();
410 : #endif
411 :
412 : #ifdef FRMT_grass
413 : GDALRegister_GRASS();
414 : #endif
415 :
416 : #ifdef FRMT_dods
417 : GDALRegister_DODS();
418 : #endif
419 :
420 : #ifdef FRMT_wcs
421 558 : GDALRegister_HTTP();
422 : #endif
423 :
424 : #ifdef FRMT_hdf5
425 558 : GDALRegister_BAG();
426 558 : GDALRegister_HDF5();
427 558 : GDALRegister_HDF5Image();
428 : #endif
429 :
430 : #ifdef FRMT_northwood
431 558 : GDALRegister_NWT_GRD();
432 558 : GDALRegister_NWT_GRC();
433 : #endif
434 :
435 : #ifdef FRMT_adrg
436 558 : GDALRegister_ADRG();
437 558 : GDALRegister_SRP();
438 : #endif
439 :
440 : #ifdef FRMT_blx
441 558 : GDALRegister_BLX();
442 : #endif
443 :
444 : #ifdef FRMT_pgchip
445 : GDALRegister_PGCHIP();
446 : #endif
447 :
448 : #ifdef FRMT_georaster
449 : GDALRegister_GEOR();
450 : #endif
451 :
452 : #ifdef FRMT_rasterlite
453 558 : GDALRegister_Rasterlite();
454 : #endif
455 :
456 : #ifdef FRMT_epsilon
457 558 : GDALRegister_EPSILON();
458 : #endif
459 :
460 : #ifdef FRMT_postgisraster
461 558 : GDALRegister_PostGISRaster();
462 : #endif
463 :
464 : #ifdef FRMT_saga
465 558 : GDALRegister_SAGA();
466 : #endif
467 :
468 : #ifdef FRMT_kmlsuperoverlay
469 558 : GDALRegister_KMLSUPEROVERLAY();
470 : #endif
471 :
472 : #ifdef FRMT_xyz
473 558 : GDALRegister_XYZ();
474 : #endif
475 :
476 : #ifdef FRMT_hf2
477 558 : GDALRegister_HF2();
478 : #endif
479 :
480 : #ifdef FRMT_pdf
481 558 : GDALRegister_PDF();
482 : #endif
483 :
484 : #ifdef FRMT_jpegls
485 : GDALRegister_JPEGLS();
486 : #endif
487 :
488 : #ifdef FRMT_ozi
489 558 : GDALRegister_OZI();
490 : #endif
491 :
492 : #ifdef FRMT_ctg
493 558 : GDALRegister_CTG();
494 : #endif
495 :
496 : #ifdef FRMT_e00grid
497 558 : GDALRegister_E00GRID();
498 : #endif
499 :
500 : #ifdef FRMT_webp
501 558 : GDALRegister_WEBP();
502 : #endif
503 :
504 : #ifdef FRMT_zmap
505 558 : GDALRegister_ZMap();
506 : #endif
507 :
508 : #ifdef FRMT_ngsgeoid
509 558 : GDALRegister_NGSGEOID();
510 : #endif
511 :
512 : /* -------------------------------------------------------------------- */
513 : /* Deregister any drivers explicitly marked as supressed by the */
514 : /* GDAL_SKIP environment variable. */
515 : /* -------------------------------------------------------------------- */
516 558 : GetGDALDriverManager()->AutoSkipDrivers();
517 558 : }
|