1 : /******************************************************************************
2 : * $Id: gdalallregister.cpp 18207 2009-12-07 21:37:49Z 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 18207 2009-12-07 21:37:49Z 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 338 : void CPL_STDCALL GDALAllRegister()
74 :
75 : {
76 338 : GetGDALDriverManager()->AutoLoadDrivers();
77 :
78 : #ifdef FRMT_vrt
79 338 : GDALRegister_VRT();
80 : #endif
81 :
82 : #ifdef FRMT_gdb
83 : GDALRegister_GDB();
84 : #endif
85 :
86 : #ifdef FRMT_gtiff
87 338 : GDALRegister_GTiff();
88 : #endif
89 :
90 : #ifdef FRMT_nitf
91 338 : GDALRegister_NITF();
92 338 : GDALRegister_RPFTOC();
93 : #endif
94 :
95 : #ifdef FRMT_hfa
96 338 : GDALRegister_HFA();
97 : #endif
98 :
99 : #ifdef FRMT_ceos2
100 338 : GDALRegister_SAR_CEOS();
101 : #endif
102 :
103 : #ifdef FRMT_ceos
104 338 : GDALRegister_CEOS();
105 : #endif
106 :
107 : #ifdef FRMT_jaxapalsar
108 338 : GDALRegister_PALSARJaxa();
109 : #endif
110 :
111 : #ifdef FRMT_gff
112 338 : GDALRegister_GFF();
113 : #endif
114 :
115 : #ifdef FRMT_elas
116 338 : GDALRegister_ELAS();
117 : #endif
118 :
119 : #ifdef FRMT_aigrid
120 : // GDALRegister_AIGrid2();
121 338 : GDALRegister_AIGrid();
122 : #endif
123 :
124 : #ifdef FRMT_aaigrid
125 338 : GDALRegister_AAIGrid();
126 : #endif
127 :
128 : #ifdef FRMT_sdts
129 338 : GDALRegister_SDTS();
130 : #endif
131 :
132 : #ifdef FRMT_ogdi
133 338 : GDALRegister_OGDI();
134 : #endif
135 :
136 : #ifdef FRMT_dted
137 338 : GDALRegister_DTED();
138 : #endif
139 :
140 : #ifdef FRMT_png
141 338 : GDALRegister_PNG();
142 : #endif
143 :
144 : #ifdef FRMT_jpeg
145 338 : GDALRegister_JPEG();
146 : #endif
147 :
148 : #ifdef FRMT_mem
149 338 : GDALRegister_MEM();
150 : #endif
151 :
152 : #ifdef FRMT_jdem
153 338 : GDALRegister_JDEM();
154 : #endif
155 :
156 : #ifdef FRMT_gif
157 338 : GDALRegister_GIF();
158 338 : GDALRegister_BIGGIF();
159 : #endif
160 :
161 : #ifdef FRMT_envisat
162 338 : GDALRegister_Envisat();
163 : #endif
164 :
165 : #ifdef FRMT_fits
166 338 : GDALRegister_FITS();
167 : #endif
168 :
169 : #ifdef FRMT_bsb
170 338 : GDALRegister_BSB();
171 : #endif
172 :
173 : #ifdef FRMT_xpm
174 338 : GDALRegister_XPM();
175 : #endif
176 :
177 : #ifdef FRMT_bmp
178 338 : GDALRegister_BMP();
179 : #endif
180 :
181 : #ifdef FRMT_dimap
182 338 : GDALRegister_DIMAP();
183 : #endif
184 :
185 : #ifdef FRMT_airsar
186 338 : GDALRegister_AirSAR();
187 : #endif
188 :
189 : #ifdef FRMT_rs2
190 338 : GDALRegister_RS2();
191 : #endif
192 :
193 : #ifdef FRMT_pcidsk
194 338 : GDALRegister_PCIDSK();
195 : #endif
196 :
197 : #ifdef FRMT_pcraster
198 338 : GDALRegister_PCRaster();
199 : #endif
200 :
201 : #ifdef FRMT_ilwis
202 338 : GDALRegister_ILWIS();
203 : #endif
204 :
205 : #ifdef FRMT_sgi
206 338 : GDALRegister_SGI();
207 : #endif
208 :
209 : #ifdef FRMT_srtmhgt
210 338 : GDALRegister_SRTMHGT();
211 : #endif
212 :
213 : #ifdef FRMT_leveller
214 338 : GDALRegister_Leveller();
215 : #endif
216 :
217 : #ifdef FRMT_terragen
218 338 : GDALRegister_Terragen();
219 : #endif
220 :
221 : #ifdef FRMT_netcdf
222 338 : GDALRegister_GMT();
223 338 : GDALRegister_netCDF();
224 : #endif
225 :
226 : #ifdef FRMT_hdf4
227 338 : GDALRegister_HDF4();
228 338 : GDALRegister_HDF4Image();
229 : #endif
230 :
231 : #ifdef FRMT_pds
232 338 : GDALRegister_ISIS3();
233 338 : GDALRegister_ISIS2();
234 338 : GDALRegister_PDS();
235 : #endif
236 :
237 : #ifdef FRMT_til
238 338 : GDALRegister_TIL();
239 : #endif
240 :
241 : #ifdef FRMT_ers
242 338 : GDALRegister_ERS();
243 : #endif
244 :
245 : #ifdef FRMT_jp2kak
246 : // JPEG2000 support using Kakadu toolkit
247 : GDALRegister_JP2KAK();
248 : #endif
249 :
250 : #ifdef FRMT_ecw
251 338 : GDALRegister_ECW();
252 338 : GDALRegister_JP2ECW();
253 : #endif
254 :
255 : #ifdef FRMT_jpeg2000
256 : // JPEG2000 support using JasPer toolkit
257 : // This one should always be placed after other JasPer supported formats,
258 : // such as BMP or PNM. In other case we will get bad side effects.
259 338 : GDALRegister_JPEG2000();
260 : #endif
261 :
262 : #ifdef FRMT_l1b
263 338 : GDALRegister_L1B();
264 : #endif
265 :
266 : #ifdef FRMT_fit
267 338 : GDALRegister_FIT();
268 : #endif
269 :
270 : #ifdef FRMT_grib
271 338 : GDALRegister_GRIB();
272 : #endif
273 :
274 : #ifdef FRMT_mrsid
275 338 : GDALRegister_MrSID();
276 : #endif
277 :
278 : #ifdef FRMT_rmf
279 338 : GDALRegister_RMF();
280 : #endif
281 :
282 : #ifdef FRMT_wcs
283 338 : GDALRegister_WCS();
284 : #endif
285 :
286 : #ifdef FRMT_wms
287 338 : GDALRegister_WMS();
288 : #endif
289 :
290 : #ifdef FRMT_sde
291 : GDALRegister_SDE();
292 : #endif
293 :
294 : #ifdef FRMT_msgn
295 338 : GDALRegister_MSGN();
296 : #endif
297 :
298 : #ifdef FRMT_msg
299 : GDALRegister_MSG();
300 : #endif
301 :
302 : #ifdef FRMT_idrisi
303 338 : GDALRegister_IDRISI();
304 : #endif
305 :
306 : #ifdef FRMT_ingr
307 338 : GDALRegister_INGR();
308 : #endif
309 :
310 : #ifdef FRMT_gsg
311 338 : GDALRegister_GSAG();
312 338 : GDALRegister_GSBG();
313 338 : GDALRegister_GS7BG();
314 : #endif
315 :
316 : #ifdef FRMT_cosar
317 338 : GDALRegister_COSAR();
318 : #endif
319 :
320 : #ifdef FRMT_tsx
321 338 : GDALRegister_TSX();
322 : #endif
323 :
324 : #ifdef FRMT_coasp
325 338 : GDALRegister_COASP();
326 : #endif
327 :
328 : #ifdef FRMT_tms
329 : GDALRegister_TMS();
330 : #endif
331 :
332 : #ifdef FRMT_r
333 338 : GDALRegister_R();
334 : #endif
335 :
336 : /* -------------------------------------------------------------------- */
337 : /* Put raw formats at the end of the list. These drivers support */
338 : /* various ASCII-header labeled formats, so the driver could be */
339 : /* confused if you have files in some of above formats and such */
340 : /* ASCII-header in the same directory. */
341 : /* -------------------------------------------------------------------- */
342 :
343 : #ifdef FRMT_raw
344 338 : GDALRegister_PNM();
345 338 : GDALRegister_DOQ1();
346 338 : GDALRegister_DOQ2();
347 338 : GDALRegister_ENVI();
348 338 : GDALRegister_EHdr();
349 338 : GDALRegister_GenBin();
350 338 : GDALRegister_PAux();
351 338 : GDALRegister_MFF();
352 338 : GDALRegister_HKV();
353 338 : GDALRegister_FujiBAS();
354 338 : GDALRegister_GSC();
355 338 : GDALRegister_FAST();
356 338 : GDALRegister_BT();
357 338 : GDALRegister_LAN();
358 338 : GDALRegister_CPG();
359 338 : GDALRegister_IDA();
360 338 : GDALRegister_NDF();
361 338 : GDALRegister_EIR();
362 338 : GDALRegister_DIPEx();
363 338 : GDALRegister_LCP();
364 : #endif
365 :
366 : /* -------------------------------------------------------------------- */
367 : /* Our test for the following is weak or expensive so we try */
368 : /* them last. */
369 : /* -------------------------------------------------------------------- */
370 :
371 : #ifdef FRMT_rik
372 338 : GDALRegister_RIK();
373 : #endif
374 :
375 : #ifdef FRMT_usgsdem
376 338 : GDALRegister_USGSDEM();
377 : #endif
378 :
379 : #ifdef FRMT_gxf
380 338 : GDALRegister_GXF();
381 : #endif
382 :
383 : #ifdef FRMT_grass
384 : GDALRegister_GRASS();
385 : #endif
386 :
387 : #ifdef FRMT_dods
388 : GDALRegister_DODS();
389 : #endif
390 :
391 : #ifdef FRMT_wcs
392 338 : GDALRegister_HTTP();
393 : #endif
394 :
395 : #ifdef FRMT_hdf5
396 338 : GDALRegister_BAG();
397 338 : GDALRegister_HDF5();
398 338 : GDALRegister_HDF5Image();
399 : #endif
400 :
401 : #ifdef FRMT_northwood
402 338 : GDALRegister_NWT_GRD();
403 338 : GDALRegister_NWT_GRC();
404 : #endif
405 :
406 : #ifdef FRMT_adrg
407 338 : GDALRegister_ADRG();
408 338 : GDALRegister_SRP();
409 : #endif
410 :
411 : #ifdef FRMT_blx
412 338 : GDALRegister_BLX();
413 : #endif
414 :
415 : #ifdef FRMT_pgchip
416 : GDALRegister_PGCHIP();
417 : #endif
418 :
419 : #ifdef FRMT_georaster
420 : GDALRegister_GEOR();
421 : #endif
422 :
423 : #ifdef FRMT_rasterlite
424 338 : GDALRegister_Rasterlite();
425 : #endif
426 :
427 : #ifdef FRMT_epsilon
428 : GDALRegister_EPSILON();
429 : #endif
430 :
431 : #ifdef FRMT_wktraster
432 338 : GDALRegister_WKTRaster();
433 : #endif
434 :
435 : #ifdef FRMT_saga
436 338 : GDALRegister_SAGA();
437 : #endif
438 : /* -------------------------------------------------------------------- */
439 : /* Deregister any drivers explicitly marked as supressed by the */
440 : /* GDAL_SKIP environment variable. */
441 : /* -------------------------------------------------------------------- */
442 338 : GetGDALDriverManager()->AutoSkipDrivers();
443 338 : }
|