当前位置: 首页>>代码示例>>C++>>正文


C++ GDALDriver类代码示例

本文整理汇总了C++中GDALDriver的典型用法代码示例。如果您正苦于以下问题:C++ GDALDriver类的具体用法?C++ GDALDriver怎么用?C++ GDALDriver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GDALDriver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GDALRegister_TSX

void GDALRegister_TSX() {
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "TSX" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "TSX" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "TerraSAR-X Product" );
/*        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_tsx.html" ); */

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

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
开发者ID:brunosimoes,项目名称:WorldWind,代码行数:18,代码来源:tsxdataset.cpp

示例2: GDALRegister_TSX

void GDALRegister_TSX()
{
    if( GDALGetDriverByName( "TSX" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "TSX" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "TerraSAR-X Product" );
    // poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_tsx.html" );
    poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

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

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
开发者ID:Wedjaa,项目名称:node-gdal,代码行数:18,代码来源:tsxdataset.cpp

示例3: GDALRegister_COASP

void GDALRegister_COASP(void)
{
	GDALDriver *poDriver;
	if ( GDALGetDriverByName( "COASP" ) == NULL ) {
		poDriver = new GDALDriver();
		poDriver->SetDescription( "COASP" );
		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:Mofangbao,项目名称:node-gdal,代码行数:18,代码来源:coasp_dataset.cpp

示例4: create_tile_dataset

dataset_t create_tile_dataset(GDALDriver& drv, unsigned int tile_xsize, unsigned int tile_ysize)
{
    dataset_t ds(make_dataset(drv.Create("", tile_xsize, tile_ysize, 3, ::GDT_Byte, 0)));
    if(!ds)
    {
        throw std::runtime_error("failed to create output dataset");
    }
    return ds;
}
开发者ID:mloskot,项目名称:workshop,代码行数:9,代码来源:gdal_image_tiles_test.cpp

示例5: CreateOutputDataset

GDALDataset* CreateOutputDataset(char* fileName, int width, int height, int bands)
{
	GDALDriverManager *gdm = GetGDALDriverManager();
	if(gdm == NULL)
		error("GetGDALDriverManager() failed!");

	GDALDriver *gd = gdm->GetDriverByName("GTiff");
	if(gd == NULL)
		error("Get GTiff Driver failed!");

	char* options[2];
	options[0] = "INTERLEAVE=BAND";
	options[1] = NULL;
	
	GDALDataset *dstDS = gd->Create(fileName, width, height, bands, GDT_Byte, options);
	
	return dstDS;
}
开发者ID:klassenjs,项目名称:image-processing,代码行数:18,代码来源:image-cross-cor.cpp

示例6: GDALRegister_AirSAR

void GDALRegister_AirSAR()

{
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "AirSAR" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "AirSAR" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "AirSAR Polarimetric Image" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_airsar.html" );
        poDriver->pfnOpen = AirSARDataset::Open;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:18,代码来源:airsardataset.cpp

示例7: GDALRegister_FujiBAS

void GDALRegister_FujiBAS()

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

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "FujiBAS" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "Fuji BAS Scanner Image" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                               "frmt_various.html#FujiBAS" );

    poDriver->pfnOpen = FujiBASDataset::Open;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
开发者ID:bbradbury,项目名称:lib_gdal,代码行数:18,代码来源:fujibasdataset.cpp

示例8: GDALRegister_MSG

void GDALRegister_MSG()

{
    GDALDriver  *poDriver;

    if( GDALGetDriverByName( "MSG" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "MSG" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "MSG HRIT Data" );

        poDriver->pfnOpen = MSGDataset::Open;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
开发者ID:0004c,项目名称:node-gdal,代码行数:18,代码来源:msgdataset.cpp

示例9: RegisterOGRGPX

void RegisterOGRGPX()

{
    if (! GDAL_CHECK_VERSION("OGR/GPX driver"))
        return;
    GDALDriver  *poDriver;

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

        poDriver->SetDescription( "GPX" );
        poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "GPX" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "gpx" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                                   "drv_gpx.html" );

        poDriver->SetMetadataItem( GDAL_DMD_CREATIONOPTIONLIST,
"<CreationOptionList>"
#ifdef WIN32
"  <Option name='LINEFORMAT' type='string-select' description='end-of-line sequence' default='CRLF'>"
#else
"  <Option name='LINEFORMAT' type='string-select' description='end-of-line sequence' default='LF'>"
#endif
"    <Value>CRLF</Value>"
"    <Value>LF</Value>"
"  </Option>"
"  <Option name='GPX_USE_EXTENSIONS' type='boolean' description='Whether to write non-GPX attributes in an <extensions> tag' default='NO'/>"
"  <Option name='GPX_EXTENSIONS_NS' type='string' description='Namespace value used for extension tags' default='ogr'/>"
"  <Option name='GPX_EXTENSIONS_NS_URL' type='string' description='Namespace URI' default='http://osgeo.org/gdal'/>"
"</CreationOptionList>");

        poDriver->SetMetadataItem( GDAL_DS_LAYER_CREATIONOPTIONLIST,
"<LayerCreationOptionList>"
"  <Option name='FORCE_GPX_TRACK' type='boolean' description='Whether to force layers with geometries of type wkbLineString as tracks' default='NO'/>"
"  <Option name='FORCE_GPX_ROUTE' type='boolean' description='Whether to force layers with geometries of type wkbMultiLineString (with single line string in them) as routes' default='NO'/>"
"</LayerCreationOptionList>");

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

        poDriver->pfnOpen = OGRGPXDriverOpen;
        poDriver->pfnCreate = OGRGPXDriverCreate;
        poDriver->pfnDelete = OGRGPXDriverDelete;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
开发者ID:drownedout,项目名称:datamap,代码行数:49,代码来源:ogrgpxdriver.cpp

示例10: GDALRegister_GRASS

void GDALRegister_GRASS()
{
    if( !GDAL_CHECK_VERSION( "GDAL/GRASS57 driver" ) )
        return;

    if( GDALGetDriverByName( "GRASS" ) != NULL )
        return;

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "GRASS" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "GRASS Rasters (5.7+)" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_grass.html" );

    poDriver->pfnOpen = GRASSDataset::Open;

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:19,代码来源:grass57dataset.cpp

示例11: 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

示例12: 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

示例13: RasterCreate

GDALDataset * RasterCreate( const char * pszFormat, const char * pszFilename, char ** papszOptions /*=NULL*/ )
{
	int nXSize = atoi(CSLFetchNameValue(papszOptions, "XSize"));
	int nYSize = atoi(CSLFetchNameValue(papszOptions, "YSize"));
	int nBands = atoi(CSLFetchNameValue(papszOptions, "Bands"));
	GDALDataType eBandType = GDALGetDataTypeByName(CSLFetchNameValue(papszOptions, "DataType"));

	char ** papszCreate = NULL;
	papszCreate = CSLSetNameValue(papszCreate, "BLOCKXSIZE", "256");
	papszCreate = CSLSetNameValue( papszCreate, "BLOCKYSIZE", "1" );

	GDALDriver * poDriver = GetRasterDriver(pszFormat);
	GDALDataset * poDS = poDriver->Create( pszFilename,
	                                       nXSize, nYSize, nBands,
	                                       eBandType, papszCreate) ;

	CSLDestroy(papszCreate);
	return poDS;
}
开发者ID:geosky,项目名称:hpgc,代码行数:19,代码来源:geoalgorithm.format.cpp

示例14: GetGDALDriverManager

GDALDriver *OGRSFDriverRegistrar::GetDriver( int iDriver )

{
    /* We must be careful only to return drivers that are actual OGRSFDriver* */
    GDALDriverManager* poDriverManager = GetGDALDriverManager();
    int nTotal = poDriverManager->GetDriverCount();
    int nOGRDriverCount = 0;
    for(int i=0;i<nTotal;i++)
    {
        GDALDriver* poDriver = poDriverManager->GetDriver(i);
        if( poDriver->GetMetadataItem(GDAL_DCAP_VECTOR) != NULL )
        {
            if( nOGRDriverCount == iDriver )
                return poDriver;
            nOGRDriverCount ++;
        }
    }
    return NULL;
}
开发者ID:Wedjaa,项目名称:node-gdal,代码行数:19,代码来源:ogrsfdriverregistrar.cpp

示例15: 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:ryandavid,项目名称:rotobox,代码行数:43,代码来源:mitab_ogr_driver.cpp


注:本文中的GDALDriver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。