LCOV - code coverage report
Current view: directory - frmts - gdalallregister.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 132 132 100.0 %
Date: 2013-03-30 Functions: 1 1 100.0 %

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

Generated by: LCOV version 1.7