Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: OGDI Bridge 4 : * Purpose: Implements OGROGDIDriver class. 5 : * Author: Daniel Morissette, danmo@videotron.ca 6 : * (Based on some code contributed by Frank Warmerdam :) 7 : * 8 : ****************************************************************************** 9 : * Copyright (c) 2000, Daniel Morissette 10 : * 11 : * SPDX-License-Identifier: MIT 12 : ****************************************************************************/ 13 : 14 : #include "ogrsf_frmts.h" 15 : 16 : #include "ogrogdidrivercore.h" 17 : 18 : /************************************************************************/ 19 : /* OGROGDIDriverIdentify() */ 20 : /************************************************************************/ 21 : 22 46298 : static int OGROGDIDriverIdentify(GDALOpenInfo *poOpenInfo) 23 : 24 : { 25 46298 : return STARTS_WITH(poOpenInfo->pszFilename, "gltp:"); 26 : } 27 : 28 : /************************************************************************/ 29 : /* OGROGDIDriverSetCommonMetadata() */ 30 : /************************************************************************/ 31 : 32 1303 : void OGROGDIDriverSetCommonMetadata(GDALDriver *poDriver) 33 : { 34 1303 : poDriver->SetDescription(DRIVER_NAME); 35 1303 : poDriver->SetMetadataItem(GDAL_DCAP_VECTOR, "YES"); 36 : 37 1303 : poDriver->SetMetadataItem(GDAL_DMD_LONGNAME, 38 1303 : "OGDI Vectors (VPF, VMAP, DCW)"); 39 1303 : poDriver->SetMetadataItem(GDAL_DMD_HELPTOPIC, "drivers/vector/ogdi.html"); 40 1303 : poDriver->SetMetadataItem(GDAL_DCAP_MULTIPLE_VECTOR_LAYERS, "YES"); 41 1303 : poDriver->SetMetadataItem(GDAL_DMD_SUPPORTED_SQL_DIALECTS, "OGRSQL SQLITE"); 42 : 43 1303 : poDriver->pfnIdentify = OGROGDIDriverIdentify; 44 1303 : poDriver->SetMetadataItem(GDAL_DCAP_OPEN, "YES"); 45 1303 : } 46 : 47 : /************************************************************************/ 48 : /* DeclareDeferredOGROGDIPlugin() */ 49 : /************************************************************************/ 50 : 51 : #ifdef PLUGIN_FILENAME 52 1595 : void DeclareDeferredOGROGDIPlugin() 53 : { 54 1595 : if (GDALGetDriverByName(DRIVER_NAME) != nullptr) 55 : { 56 302 : return; 57 : } 58 1293 : auto poDriver = new GDALPluginDriverProxy(PLUGIN_FILENAME); 59 : #ifdef PLUGIN_INSTALLATION_MESSAGE 60 : poDriver->SetMetadataItem(GDAL_DMD_PLUGIN_INSTALLATION_MESSAGE, 61 : PLUGIN_INSTALLATION_MESSAGE); 62 : #endif 63 1293 : OGROGDIDriverSetCommonMetadata(poDriver); 64 1293 : GetGDALDriverManager()->DeclareDeferredPluginDriver(poDriver); 65 : } 66 : #endif