當前位置: 首頁>>代碼示例>>C++>>正文


C++ GDALGetDriverByName函數代碼示例

本文整理匯總了C++中GDALGetDriverByName函數的典型用法代碼示例。如果您正苦於以下問題:C++ GDALGetDriverByName函數的具體用法?C++ GDALGetDriverByName怎麽用?C++ GDALGetDriverByName使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GDALGetDriverByName函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: RegisterOGRHTF

void RegisterOGRHTF()

{
    if( GDALGetDriverByName( "HTF" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "HTF" );
    poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "Hydrographic Transfer Vector" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "drv_htf.html" );
    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

    poDriver->pfnOpen = OGRHTFDriverOpen;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:Mavrx-inc,項目名稱:gdal,代碼行數:19,代碼來源:ogrhtfdriver.cpp

示例2: GDALRegister_SDTS

void GDALRegister_SDTS()

{
    if( GDALGetDriverByName( "SDTS" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "SDTS" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "SDTS Raster" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#SDTS" );
    poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "ddf" );
    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

    poDriver->pfnOpen = SDTSDataset::Open;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:bbradbury,項目名稱:lib_gdal,代碼行數:19,代碼來源:sdtsdataset.cpp

示例3: GDALRegister_COASP

void GDALRegister_COASP(void)
{
	GDALDriver *poDriver;
	if ( GDALGetDriverByName( "COASP" ) == NULL ) {
		poDriver = new GDALDriver();
		poDriver->SetDescription( "COASP" );
        poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
		poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
			"DRDC COASP SAR Processor Raster" );
		poDriver->SetMetadataItem( GDAL_DMD_EXTENSION,
			"hdr" );
/*		poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
			"frmt_coasp.html"); */
		poDriver->pfnIdentify = COASPDataset::Identify;
		poDriver->pfnOpen = COASPDataset::Open;
		GetGDALDriverManager()->RegisterDriver( poDriver );
	}

}
開發者ID:garnertb,項目名稱:gdal,代碼行數:19,代碼來源:coasp_dataset.cpp

示例4: RegisterOGRTAB

void RegisterOGRTAB()

{
    if( GDALGetDriverByName("MapInfo File") != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription("MapInfo File");
    poDriver->SetMetadataItem(GDAL_DCAP_VECTOR, "YES");
    poDriver->SetMetadataItem(GDAL_DMD_LONGNAME, "MapInfo File");
    poDriver->SetMetadataItem(GDAL_DMD_EXTENSIONS, "tab mif mid");
    poDriver->SetMetadataItem(GDAL_DMD_HELPTOPIC, "drv_mitab.html");
    poDriver->SetMetadataItem(GDAL_DCAP_VIRTUALIO, "YES");
    poDriver->SetMetadataItem(GDAL_DS_LAYER_CREATIONOPTIONLIST,
"<LayerCreationOptionList>"
"  <Option name='BOUNDS' type='string' description='Custom bounds. Expect format is xmin,ymin,xmax,ymax'/>"
"</LayerCreationOptionList>");

    poDriver->SetMetadataItem(GDAL_DMD_CREATIONOPTIONLIST,
"<CreationOptionList>"
"  <Option name='FORMAT' type='string-select' description='type of MapInfo format'>"
"    <Value>MIF</Value>"
"    <Value>TAB</Value>"
"  </Option>"
"  <Option name='SPATIAL_INDEX_MODE' type='string-select' description='type of spatial index' default='QUICK'>"
"    <Value>QUICK</Value>"
"    <Value>OPTIMIZED</Value>"
"  </Option>"
"  <Option name='BLOCKSIZE' type='int' description='.map block size' min='512' max='32256' default='512'/>"
"</CreationOptionList>");

    poDriver->SetMetadataItem(GDAL_DMD_CREATIONFIELDDATATYPES,
                              "Integer Real String Date DateTime Time");

    poDriver->pfnOpen = OGRTABDriverOpen;
    poDriver->pfnIdentify = OGRTABDriverIdentify;
    poDriver->pfnCreate = OGRTABDriverCreate;
    poDriver->pfnDelete = OGRTABDriverDelete;
    poDriver->pfnUnloadDriver = OGRTABDriverUnload;

    GetGDALDriverManager()->RegisterDriver(poDriver);
}
開發者ID:Mavrx-inc,項目名稱:gdal,代碼行數:43,代碼來源:mitab_ogr_driver.cpp

示例5: GDALRegister_DIPEx

void GDALRegister_DIPEx()

{
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "DIPEx" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "DIPEx" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "DIPEx" );
        poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

        poDriver->pfnOpen = DIPExDataset::Open;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
開發者ID:0004c,項目名稱:node-gdal,代碼行數:19,代碼來源:dipxdataset.cpp

示例6: GDALRegister_NWT_GRD

void GDALRegister_NWT_GRD()
{
    GDALDriver *poDriver;

    if( GDALGetDriverByName( "NWT_GRD" ) == NULL )
    {
        poDriver = new GDALDriver();

        poDriver->SetDescription( "NWT_GRD" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                 "Northwood Numeric Grid Format .grd/.tab" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#grd");
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "grd" );

        poDriver->pfnOpen = NWT_GRDDataset::Open;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
開發者ID:actian-geospatial,項目名稱:ogr-ingres,代碼行數:19,代碼來源:grddataset.cpp

示例7: GDALRegister_GXF

void GDALRegister_GXF()

{
    if( GDALGetDriverByName( "GXF" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "GXF" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                               "GeoSoft Grid Exchange Format" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#GXF" );
    poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "gxf" );

    poDriver->pfnOpen = GXFDataset::Open;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:bbradbury,項目名稱:lib_gdal,代碼行數:19,代碼來源:gxfdataset.cpp

示例8: GDALRegister_VICAR

void GDALRegister_VICAR()

{
    if( GDALGetDriverByName( "VICAR" ) != nullptr )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "VICAR" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "MIPL VICAR file" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_vicar.html" );
    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

    poDriver->pfnOpen = VICARDataset::Open;
    poDriver->pfnIdentify = VICARDataset::Identify;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:hdfeos,項目名稱:gdal,代碼行數:19,代碼來源:vicardataset.cpp

示例9: GDALRegister_DOQ2

void GDALRegister_DOQ2()

{
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "DOQ2" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "DOQ2" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "USGS DOQ (New Style)" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, 
                                   "frmt_various.html#DOQ2" );

        poDriver->pfnOpen = DOQ2Dataset::Open;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
開發者ID:actian-geospatial,項目名稱:ogr-ingres,代碼行數:20,代碼來源:doq2dataset.cpp

示例10: createMark

void HazePerfection::createMark(float b)
{
	const char *pszFormat = "GTiff";
	const char *markfile = m_markfilename.c_str();
	GDALDriver *poDriver = (GDALDriver*)GDALGetDriverByName(pszFormat);
	markDataset = poDriver->Create(markfile, nXSize, nYSize, 1, GDT_Float32, NULL);
	markDataset->SetGeoTransform(sGeoTrans);
	markDataset->SetProjection(hotDataset->GetProjectionRef());
	float *pixelData = new float[nXSize*nYSize];
	GDALRasterBand *maskBand = maskDataset->GetRasterBand(1);
	maskBand->RasterIO(GF_Read, 0, 0, nXSize, nYSize, pixelData, nXSize, nYSize, GDT_Float32, 0, 0);
	for (int i = 1; i < nYSize-1; i++)
	{
		for (int j = 1; j < nXSize - 1; j++)
			pixelData[i*nXSize + j] = b;
	}
	GDALRasterBand *markBand = markDataset->GetRasterBand(1);
	markBand->RasterIO(GF_Write, 0, 0, nXSize, nYSize, pixelData, nXSize, nYSize, GDT_Float32, 0, 0);
	delete[]pixelData;
}
開發者ID:MrXue,項目名稱:removeHaze,代碼行數:20,代碼來源:RemoveHaze.cpp

示例11: GDALRegister_NWT_GRD

void GDALRegister_NWT_GRD()
{
    if( GDALGetDriverByName( "NWT_GRD" ) != NULL )
      return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "NWT_GRD" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                               "Northwood Numeric Grid Format .grd/.tab" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#grd");
    poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "grd" );
    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

    poDriver->pfnOpen = NWT_GRDDataset::Open;
    poDriver->pfnIdentify = NWT_GRDDataset::Identify;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:Wedjaa,項目名稱:node-gdal,代碼行數:20,代碼來源:grddataset.cpp

示例12: GDALRegister_AirSAR

void GDALRegister_AirSAR()

{
    if( GDALGetDriverByName( "AirSAR" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "AirSAR" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                               "AirSAR Polarimetric Image" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_airsar.html" );

    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

    poDriver->pfnOpen = AirSARDataset::Open;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:ryandavid,項目名稱:rotobox,代碼行數:20,代碼來源:airsardataset.cpp

示例13: RegisterOGRREC

void RegisterOGRREC()

{
    GDALDriver  *poDriver;

    if( GDALGetDriverByName( "REC" ) == NULL )
    {
        poDriver = new GDALDriver();

        poDriver->SetDescription( "REC" );
        poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "rec" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "EPIInfo .REC " );

        poDriver->pfnOpen = OGRRECDriverOpen;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
開發者ID:rashadkm,項目名稱:lib_gdal,代碼行數:20,代碼來源:ogrrecdriver.cpp

示例14: GDALRegister_LAN

void GDALRegister_LAN()

{
    if( GDALGetDriverByName( "LAN" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "LAN" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "Erdas .LAN/.GIS" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#LAN" );
    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_CREATIONDATATYPES, "Byte Int16" );

    poDriver->pfnOpen = LANDataset::Open;
    poDriver->pfnCreate = LANDataset::Create;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
開發者ID:bbradbury,項目名稱:lib_gdal,代碼行數:20,代碼來源:landataset.cpp

示例15: GDALRegister_SIGDEM

void GDALRegister_SIGDEM() {
    if (GDALGetDriverByName("SIGDEM") == nullptr) {
        GDALDriver *poDriver = new GDALDriver();

        poDriver->SetDescription("SIGDEM");
        poDriver->SetMetadataItem(GDAL_DCAP_RASTER, "YES");
        poDriver->SetMetadataItem(GDAL_DMD_LONGNAME,
                "Scaled Integer Gridded DEM .sigdem");
        poDriver->SetMetadataItem(GDAL_DMD_HELPTOPIC,
                "frmt_various.html#SIGDEM");
        poDriver->SetMetadataItem(GDAL_DMD_EXTENSION, "sigdem");

        poDriver->SetMetadataItem(GDAL_DCAP_VIRTUALIO, "YES");
        poDriver->pfnCreateCopy = SIGDEMDataset::CreateCopy;
        poDriver->pfnIdentify = SIGDEMDataset::Identify;
        poDriver->pfnOpen = SIGDEMDataset::Open;

        GetGDALDriverManager()->RegisterDriver(poDriver);
    }
}
開發者ID:OSGeo,項目名稱:gdal,代碼行數:20,代碼來源:sigdemdataset.cpp


注:本文中的GDALGetDriverByName函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。