LTP GCOV extension - code coverage report
Current view: directory - frmts - gdalallregister.cpp
Test: gdal_filtered.info
Date: 2010-07-12 Instrumented lines: 106
Code covered: 100.0 % Executed lines: 106

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

Generated by: LTP GCOV extension version 1.5