LCOV - code coverage report
Current view: directory - frmts - gdalallregister.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 131 131 100.0 %
Date: 2012-12-26 Functions: 1 1 100.0 %

       1                 : /******************************************************************************
       2                 :  * $Id: gdalallregister.cpp 25287 2012-12-05 21:17:14Z 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 25287 2012-12-05 21:17:14Z 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             582 : void CPL_STDCALL GDALAllRegister()
      74                 : 
      75                 : {
      76             582 :     GetGDALDriverManager()->AutoLoadDrivers();
      77                 : 
      78                 : #ifdef FRMT_vrt
      79             582 :     GDALRegister_VRT();
      80                 : #endif    
      81                 : 
      82                 : #ifdef FRMT_gdb    
      83                 :     GDALRegister_GDB();
      84                 : #endif    
      85                 : 
      86                 : #ifdef FRMT_gtiff    
      87             582 :     GDALRegister_GTiff();
      88                 : #endif    
      89                 : 
      90                 : #ifdef FRMT_nitf
      91             582 :     GDALRegister_NITF();
      92             582 :     GDALRegister_RPFTOC();
      93             582 :     GDALRegister_ECRGTOC();
      94                 : #endif
      95                 : 
      96                 : #ifdef FRMT_hfa
      97             582 :     GDALRegister_HFA();
      98                 : #endif
      99                 :     
     100                 : #ifdef FRMT_ceos2
     101             582 :     GDALRegister_SAR_CEOS();
     102                 : #endif
     103                 :     
     104                 : #ifdef FRMT_ceos
     105             582 :     GDALRegister_CEOS();
     106                 : #endif
     107                 :     
     108                 : #ifdef FRMT_jaxapalsar
     109             582 :     GDALRegister_PALSARJaxa();
     110                 : #endif
     111                 :     
     112                 : #ifdef FRMT_gff
     113             582 :     GDALRegister_GFF();
     114                 : #endif
     115                 : 
     116                 : #ifdef FRMT_elas
     117             582 :     GDALRegister_ELAS();
     118                 : #endif
     119                 :     
     120                 : #ifdef FRMT_aigrid
     121                 : //    GDALRegister_AIGrid2();
     122             582 :     GDALRegister_AIGrid();
     123                 : #endif
     124                 : 
     125                 : #ifdef FRMT_aaigrid
     126             582 :     GDALRegister_AAIGrid();
     127             582 :     GDALRegister_GRASSASCIIGrid();
     128                 : #endif
     129                 : 
     130                 : #ifdef FRMT_sdts
     131             582 :     GDALRegister_SDTS();
     132                 : #endif
     133                 : 
     134                 : #ifdef FRMT_ogdi
     135             582 :     GDALRegister_OGDI();
     136                 : #endif
     137                 : 
     138                 : #ifdef FRMT_dted
     139             582 :     GDALRegister_DTED();
     140                 : #endif
     141                 : 
     142                 : #ifdef FRMT_png
     143             582 :     GDALRegister_PNG();
     144                 : #endif
     145                 : 
     146                 : #ifdef FRMT_gta
     147             582 :     GDALRegister_GTA();
     148                 : #endif
     149                 : 
     150                 : #ifdef FRMT_jpeg
     151             582 :     GDALRegister_JPEG();
     152                 : #endif
     153                 : 
     154                 : #ifdef FRMT_mem
     155             582 :     GDALRegister_MEM();
     156                 : #endif
     157                 : 
     158                 : #ifdef FRMT_jdem
     159             582 :     GDALRegister_JDEM();
     160                 : #endif
     161                 : 
     162                 : #ifdef FRMT_rasdaman
     163             582 :     GDALRegister_RASDAMAN();
     164                 : #endif
     165                 : 
     166                 : #ifdef FRMT_gif
     167             582 :     GDALRegister_GIF();
     168             582 :     GDALRegister_BIGGIF();
     169                 : #endif
     170                 : 
     171                 : #ifdef FRMT_envisat
     172             582 :     GDALRegister_Envisat();
     173                 : #endif
     174                 : 
     175                 : #ifdef FRMT_fits
     176             582 :     GDALRegister_FITS();
     177                 : #endif
     178                 : 
     179                 : #ifdef FRMT_bsb
     180             582 :     GDALRegister_BSB();
     181                 : #endif
     182                 : 
     183                 : #ifdef FRMT_xpm
     184             582 :     GDALRegister_XPM();
     185                 : #endif
     186                 : 
     187                 : #ifdef FRMT_bmp
     188             582 :     GDALRegister_BMP();
     189                 : #endif
     190                 : 
     191                 : #ifdef FRMT_dimap
     192             582 :     GDALRegister_DIMAP();
     193                 : #endif
     194                 : 
     195                 : #ifdef FRMT_airsar
     196             582 :     GDALRegister_AirSAR();
     197                 : #endif
     198                 : 
     199                 : #ifdef FRMT_rs2
     200             582 :     GDALRegister_RS2();
     201                 : #endif
     202                 : 
     203                 : #ifdef FRMT_pcidsk
     204             582 :     GDALRegister_PCIDSK();
     205                 : #endif
     206                 : 
     207                 : #ifdef FRMT_pcraster
     208             582 :     GDALRegister_PCRaster();
     209                 : #endif
     210                 : 
     211                 : #ifdef FRMT_ilwis
     212             582 :     GDALRegister_ILWIS();
     213                 : #endif
     214                 : 
     215                 : #ifdef FRMT_sgi
     216             582 :     GDALRegister_SGI();
     217                 : #endif
     218                 : 
     219                 : #ifdef FRMT_srtmhgt
     220             582 :     GDALRegister_SRTMHGT();
     221                 : #endif
     222                 : 
     223                 : #ifdef FRMT_leveller
     224             582 :     GDALRegister_Leveller();
     225                 : #endif
     226                 : 
     227                 : #ifdef FRMT_terragen
     228             582 :     GDALRegister_Terragen();
     229                 : #endif
     230                 : 
     231                 : #ifdef FRMT_netcdf
     232             582 :     GDALRegister_GMT();
     233             582 :     GDALRegister_netCDF();
     234                 : #endif
     235                 : 
     236                 : #ifdef FRMT_hdf4
     237             582 :     GDALRegister_HDF4();
     238             582 :     GDALRegister_HDF4Image();
     239                 : #endif
     240                 : 
     241                 : #ifdef FRMT_pds
     242             582 :     GDALRegister_ISIS3();
     243             582 :     GDALRegister_ISIS2();
     244             582 :     GDALRegister_PDS();
     245                 : #endif
     246                 : 
     247                 : #ifdef FRMT_til
     248             582 :     GDALRegister_TIL();
     249                 : #endif
     250                 : 
     251                 : #ifdef FRMT_ers
     252             582 :     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             582 :     GDALRegister_ECW();
     267             582 :     GDALRegister_JP2ECW();
     268                 : #endif
     269                 : 
     270                 : #ifdef FRMT_openjpeg
     271                 : // JPEG2000 support using OpenJPEG library
     272             582 :     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             582 :     GDALRegister_JPEG2000();
     280                 : #endif
     281                 : 
     282                 : #ifdef FRMT_l1b
     283             582 :     GDALRegister_L1B();
     284                 : #endif
     285                 : 
     286                 : #ifdef FRMT_fit
     287             582 :     GDALRegister_FIT();
     288                 : #endif
     289                 : 
     290                 : #ifdef FRMT_grib
     291             582 :     GDALRegister_GRIB();
     292                 : #endif
     293                 : 
     294                 : #ifdef FRMT_mrsid
     295             582 :     GDALRegister_MrSID();
     296                 : #endif
     297                 : 
     298                 : #ifdef FRMT_mrsid_lidar
     299             582 :     GDALRegister_MG4Lidar();
     300                 : #endif
     301                 : 
     302                 : #ifdef FRMT_rmf
     303             582 :     GDALRegister_RMF();
     304                 : #endif
     305                 : 
     306                 : #ifdef FRMT_wcs
     307             582 :     GDALRegister_WCS();
     308                 : #endif
     309                 : 
     310                 : #ifdef FRMT_wms
     311             582 :     GDALRegister_WMS();
     312                 : #endif
     313                 : 
     314                 : #ifdef FRMT_sde
     315                 :     GDALRegister_SDE();
     316                 : #endif
     317                 : 
     318                 : #ifdef FRMT_msgn
     319             582 :     GDALRegister_MSGN();
     320                 : #endif
     321                 : 
     322                 : #ifdef FRMT_msg
     323                 :     GDALRegister_MSG();
     324                 : #endif
     325                 : 
     326                 : #ifdef FRMT_idrisi
     327             582 :     GDALRegister_IDRISI();
     328                 : #endif
     329                 : 
     330                 : #ifdef FRMT_ingr
     331             582 :     GDALRegister_INGR();
     332                 : #endif
     333                 : 
     334                 : #ifdef FRMT_gsg
     335             582 :     GDALRegister_GSAG();
     336             582 :     GDALRegister_GSBG();
     337             582 :     GDALRegister_GS7BG();
     338                 : #endif
     339                 : 
     340                 : #ifdef FRMT_cosar
     341             582 :     GDALRegister_COSAR();
     342                 : #endif
     343                 : 
     344                 : #ifdef FRMT_tsx
     345             582 :     GDALRegister_TSX();
     346                 : #endif
     347                 : 
     348                 : #ifdef FRMT_coasp
     349             582 :     GDALRegister_COASP();
     350                 : #endif
     351                 : 
     352                 : #ifdef FRMT_tms
     353                 :     GDALRegister_TMS();
     354                 : #endif
     355                 : 
     356                 : #ifdef FRMT_r
     357             582 :     GDALRegister_R();
     358                 : #endif
     359                 : 
     360                 : #ifdef FRMT_map
     361             582 :     GDALRegister_MAP();
     362                 : #endif
     363                 : 
     364                 : /* -------------------------------------------------------------------- */
     365                 : /*      Put raw formats at the end of the list. These drivers support   */
     366                 : /*      various ASCII-header labeled formats, so the driver could be    */
     367                 : /*      confused if you have files in some of above formats and such    */
     368                 : /*      ASCII-header in the same directory.                             */
     369                 : /* -------------------------------------------------------------------- */
     370                 : 
     371                 : #ifdef FRMT_raw
     372             582 :     GDALRegister_PNM();
     373             582 :     GDALRegister_DOQ1();
     374             582 :     GDALRegister_DOQ2();
     375             582 :     GDALRegister_ENVI();
     376             582 :     GDALRegister_EHdr();
     377             582 :     GDALRegister_GenBin();
     378             582 :     GDALRegister_PAux();
     379             582 :     GDALRegister_MFF();
     380             582 :     GDALRegister_HKV();
     381             582 :     GDALRegister_FujiBAS();
     382             582 :     GDALRegister_GSC();
     383             582 :     GDALRegister_FAST();
     384             582 :     GDALRegister_BT();
     385             582 :     GDALRegister_LAN();
     386             582 :     GDALRegister_CPG();
     387             582 :     GDALRegister_IDA();
     388             582 :     GDALRegister_NDF();
     389             582 :     GDALRegister_EIR();
     390             582 :     GDALRegister_DIPEx();
     391             582 :     GDALRegister_LCP();
     392             582 :     GDALRegister_GTX();
     393             582 :     GDALRegister_LOSLAS();
     394             582 :     GDALRegister_NTv2();
     395             582 :     GDALRegister_CTable2();
     396             582 :     GDALRegister_ACE2();
     397             582 :     GDALRegister_SNODAS();
     398                 : #endif
     399                 : 
     400                 : #ifdef FRMT_arg
     401             582 :     GDALRegister_ARG();
     402                 : #endif
     403                 : 
     404                 : /* -------------------------------------------------------------------- */
     405                 : /*      Our test for the following is weak or expensive so we try       */
     406                 : /*      them last.                                                      */
     407                 : /* -------------------------------------------------------------------- */
     408                 : 
     409                 : #ifdef FRMT_rik
     410             582 :     GDALRegister_RIK();
     411                 : #endif
     412                 : 
     413                 : #ifdef FRMT_usgsdem
     414             582 :     GDALRegister_USGSDEM();
     415                 : #endif
     416                 : 
     417                 : #ifdef FRMT_gxf
     418             582 :     GDALRegister_GXF();
     419                 : #endif    
     420                 : 
     421                 : #ifdef FRMT_grass
     422                 :     GDALRegister_GRASS();
     423                 : #endif
     424                 : 
     425                 : #ifdef FRMT_dods
     426                 :     GDALRegister_DODS();
     427                 : #endif
     428                 : 
     429                 : #ifdef FRMT_wcs
     430             582 :     GDALRegister_HTTP();
     431                 : #endif
     432                 : 
     433                 : #ifdef FRMT_hdf5
     434             582 :     GDALRegister_BAG();
     435             582 :     GDALRegister_HDF5();
     436             582 :     GDALRegister_HDF5Image();
     437                 : #endif
     438                 : 
     439                 : #ifdef FRMT_northwood
     440             582 :     GDALRegister_NWT_GRD();
     441             582 :     GDALRegister_NWT_GRC();
     442                 : #endif
     443                 : 
     444                 : #ifdef FRMT_adrg
     445             582 :     GDALRegister_ADRG();
     446             582 :     GDALRegister_SRP();
     447                 : #endif
     448                 : 
     449                 : #ifdef FRMT_blx
     450             582 :     GDALRegister_BLX();
     451                 : #endif
     452                 : 
     453                 : #ifdef FRMT_pgchip
     454                 :     GDALRegister_PGCHIP();
     455                 : #endif
     456                 : 
     457                 : #ifdef FRMT_georaster
     458                 :     GDALRegister_GEOR();
     459                 : #endif
     460                 : 
     461                 : #ifdef FRMT_rasterlite
     462             582 :     GDALRegister_Rasterlite();
     463                 : #endif
     464                 : 
     465                 : #ifdef FRMT_epsilon
     466             582 :     GDALRegister_EPSILON();
     467                 : #endif
     468                 : 
     469                 : #ifdef FRMT_postgisraster
     470             582 :     GDALRegister_PostGISRaster();
     471                 : #endif
     472                 : 
     473                 : #ifdef FRMT_saga
     474             582 :     GDALRegister_SAGA();
     475                 : #endif
     476                 : 
     477                 : #ifdef FRMT_kmlsuperoverlay
     478             582 :     GDALRegister_KMLSUPEROVERLAY();
     479                 : #endif
     480                 : 
     481                 : #ifdef FRMT_xyz
     482             582 :     GDALRegister_XYZ();
     483                 : #endif
     484                 : 
     485                 : #ifdef FRMT_hf2
     486             582 :     GDALRegister_HF2();
     487                 : #endif
     488                 : 
     489                 : #ifdef FRMT_pdf
     490             582 :     GDALRegister_PDF();
     491                 : #endif
     492                 : 
     493                 : #ifdef FRMT_jpegls
     494                 :     GDALRegister_JPEGLS();
     495                 : #endif
     496                 : 
     497                 : #ifdef FRMT_ozi
     498             582 :     GDALRegister_OZI();
     499                 : #endif
     500                 : 
     501                 : #ifdef FRMT_ctg
     502             582 :     GDALRegister_CTG();
     503                 : #endif
     504                 : 
     505                 : #ifdef FRMT_e00grid
     506             582 :     GDALRegister_E00GRID();
     507                 : #endif
     508                 : 
     509                 : #ifdef FRMT_webp
     510             582 :     GDALRegister_WEBP();
     511                 : #endif
     512                 : 
     513                 : #ifdef FRMT_zmap
     514             582 :     GDALRegister_ZMap();
     515                 : #endif
     516                 : 
     517                 : #ifdef FRMT_ngsgeoid
     518             582 :     GDALRegister_NGSGEOID();
     519                 : #endif
     520                 : 
     521                 : #ifdef FRMT_mbtiles
     522             582 :     GDALRegister_MBTiles();
     523                 : #endif
     524                 : 
     525                 : #ifdef FRMT_iris
     526             582 :     GDALRegister_IRIS();
     527                 : #endif
     528                 : /* -------------------------------------------------------------------- */
     529                 : /*      Deregister any drivers explicitly marked as supressed by the    */
     530                 : /*      GDAL_SKIP environment variable.                                 */
     531                 : /* -------------------------------------------------------------------- */
     532             582 :     GetGDALDriverManager()->AutoSkipDrivers();
     533             582 : }

Generated by: LCOV version 1.7