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


C++ GetGDALDriverManager函数代码示例

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


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

示例1: GDALRegister_ECRGTOC

void GDALRegister_ECRGTOC()

{
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "ECRGTOC" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "ECRGTOC" );
        poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "ECRG TOC format" );
        
        poDriver->pfnIdentify = ECRGTOCDataset::Identify;
        poDriver->pfnOpen = ECRGTOCDataset::Open;

        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, 
                                   "frmt_various.html#ECRGTOC" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "xml" );
        poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_SUBDATASETS, "YES" );

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
开发者ID:miccferr,项目名称:wmshp-electron,代码行数:26,代码来源:ecrgtocdataset.cpp

示例2: GDALRegister_Terragen

void GDALRegister_Terragen()

{
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "Terragen" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "Terragen" );
        poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, 
                                   "ter" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "Terragen heightfield" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, 
                                   "frmt_terragen.html" );

        poDriver->SetMetadataItem( GDAL_DMD_CREATIONOPTIONLIST,
"<CreationOptionList>"
"   <Option name='MINUSERPIXELVALUE' type='float' description='Lowest logical elevation'/>"
"   <Option name='MAXUSERPIXELVALUE' type='float' description='Highest logical elevation'/>"
"</CreationOptionList>" );
        
        poDriver->pfnOpen = TerragenDataset::Open;
        poDriver->pfnCreate = TerragenDataset::Create;

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

示例3: GDALRegister_HDF5

CPL_C_END



/************************************************************************/
/* ==================================================================== */
/*                              HDF5Dataset                             */
/* ==================================================================== */
/************************************************************************/

/************************************************************************/
/*                        GDALRegister_HDF5()                           */
/************************************************************************/
void GDALRegister_HDF5()

{
    GDALDriver	*poDriver;
    if( GDALGetDriverByName("HDF5") == NULL )
    {
        poDriver = new GDALDriver();
        poDriver->SetDescription("HDF5");
        poDriver->SetMetadataItem(GDAL_DMD_LONGNAME,
                                  "Hierarchical Data Format Release 5");
        poDriver->SetMetadataItem(GDAL_DMD_HELPTOPIC,
                                  "frmt_hdf5.html");
        poDriver->SetMetadataItem(GDAL_DMD_EXTENSION, "hdf5");
        poDriver->pfnOpen = HDF5Dataset::Open;
        poDriver->pfnIdentify = HDF5Dataset::Identify;
        GetGDALDriverManager()->RegisterDriver(poDriver);
    }
}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:31,代码来源:hdf5dataset.cpp

示例4: GDALRegister_BT

void GDALRegister_BT()

{
    GDALDriver  *poDriver;

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

        poDriver->SetDescription( "BT" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "VTP .bt (Binary Terrain) 1.3 Format" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                                   "frmt_various.html#BT" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "bt" );
        poDriver->SetMetadataItem( GDAL_DMD_CREATIONDATATYPES,
                                   "Int16 Int32 Float32" );
        poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

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

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

示例5: OGRDeregisterDriver

void OGRDeregisterDriver( OGRSFDriverH hDriver )

{
    VALIDATE_POINTER0( hDriver, "OGRDeregisterDriver" );
    
    GetGDALDriverManager()->DeregisterDriver( (GDALDriver*)hDriver );
}
开发者ID:garnertb,项目名称:gdal,代码行数:7,代码来源:ogrsfdriverregistrar.cpp

示例6: GDALRegister_PNM

void GDALRegister_PNM()

{
    GDALDriver  *poDriver;

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

        poDriver->SetDescription( "PNM" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "Portable Pixmap Format (netpbm)" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                                   "frmt_various.html#PNM" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "pnm" );
        poDriver->SetMetadataItem( GDAL_DMD_MIMETYPE,
                                   "image/x-portable-anymap" );
        poDriver->SetMetadataItem( GDAL_DMD_CREATIONDATATYPES,
                                   "Byte UInt16" );
        poDriver->SetMetadataItem( GDAL_DMD_CREATIONOPTIONLIST,
"<CreationOptionList>"
"   <Option name='MAXVAL' type='unsigned int' description='Maximum color value'/>"
"</CreationOptionList>" );
        poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );

        poDriver->pfnOpen = PNMDataset::Open;
        poDriver->pfnCreate = PNMDataset::Create;
        poDriver->pfnIdentify = PNMDataset::Identify;

        GetGDALDriverManager()->RegisterDriver( poDriver );
    }
}
开发者ID:Joe-xXx,项目名称:gdal,代码行数:32,代码来源:pnmdataset.cpp

示例7: GDALRegister_RIK

void GDALRegister_RIK()

{
    GDALDriver	*poDriver;

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

        poDriver->SetDescription( "RIK" );
        poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "Swedish Grid RIK (.rik)" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                                   "frmt_various.html#RIK" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "rik" );

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

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

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

示例8: GDALRegister_GTX

void GDALRegister_GTX()

{
    GDALDriver	*poDriver;

    if( GDALGetDriverByName( "GTX" ) == NULL )
    {
        poDriver = new GDALDriver();
        
        poDriver->SetDescription( "GTX" );
        poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, 
                                   "NOAA Vertical Datum .GTX" );
        poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "gtx" );
        poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );
//        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, 
//                                   "frmt_various.html#GTX" );
        
        poDriver->SetMetadataItem( GDAL_DMD_CREATIONDATATYPES, 
                                   "Float32" );

        poDriver->pfnOpen = GTXDataset::Open;
        poDriver->pfnIdentify = GTXDataset::Identify;
        poDriver->pfnCreate = GTXDataset::Create;

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

示例9: GDALRegister_EPSILON

void GDALRegister_EPSILON()

{
    if( !GDAL_CHECK_VERSION( "EPSILON driver" ) )
        return;

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

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "EPSILON" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );

    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "Epsilon wavelets" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_epsilon.html" );
    poDriver->SetMetadataItem( GDAL_DMD_CREATIONDATATYPES, "Byte" );

    CPLString osMethods;
    char** papszFBID = eps_get_fb_info(EPS_FB_ID);
    char** papszFBIDIter = papszFBID;
    while(papszFBIDIter && *papszFBIDIter)
    {
        osMethods += "       <Value>";
        osMethods += *papszFBIDIter;
        osMethods += "</Value>\n";
        papszFBIDIter ++;
    }
    eps_free_fb_info(papszFBID);

    CPLString osOptionList;
    osOptionList.Printf(
"<CreationOptionList>"
"   <Option name='TARGET' type='int' description='target size reduction as a percentage of the original (0-100)' default='75'/>"
"   <Option name='FILTER' type='string-select' description='Filter ID' default='daub97lift'>"
"%s"
"   </Option>"
"   <Option name='BLOCKXSIZE' type='int' description='Tile Width. Between 32 and 1024' default='256'/>"
"   <Option name='BLOCKYSIZE' type='int' description='Tile Height. Between 32 and 1024' default='256'/>"
"   <Option name='MODE' type='string-select' default='OTLPF'>"
"       <Value>NORMAL</Value>"
"       <Value>OTLPF</Value>"
"   </Option>"
"   <Option name='RGB_RESAMPLE' type='boolean' description='if RGB must be resampled to 4:2:0' default='YES'/>"
"   <Option name='RASTERLITE_OUTPUT' type='boolean' description='if Rasterlite header and footers must be inserted' default='FALSE'/>"
"</CreationOptionList>", osMethods.c_str()  );

    poDriver->SetMetadataItem( GDAL_DMD_CREATIONOPTIONLIST,
                               osOptionList.c_str() );

    poDriver->pfnOpen = EpsilonDataset::Open;
    poDriver->pfnIdentify = EpsilonDataset::Identify;
    poDriver->pfnCreateCopy = EpsilonDatasetCreateCopy;

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

    GetGDALDriverManager()->RegisterDriver( poDriver );
}
开发者ID:ryandavid,项目名称:rotobox,代码行数:58,代码来源:epsilondataset.cpp

示例10: RegisterOGRMySQL

void RegisterOGRMySQL()

{
    if (! GDAL_CHECK_VERSION("MySQL driver"))
        return;
  
    GDALDriver  *poDriver;

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

        poDriver->SetDescription( "MySQL" );
        poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );
        poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                   "MySQL" );
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                                   "drv_mysql.html" );

        poDriver->SetMetadataItem( GDAL_DMD_CONNECTION_PREFIX, "MYSQL:" );

        poDriver->SetMetadataItem( GDAL_DMD_OPENOPTIONLIST,
"<OpenOptionList>"
"  <Option name='DBNAME' type='string' description='Database name' required='true'/>"
"  <Option name='PORT' type='int' description='Port'/>"
"  <Option name='USER' type='string' description='User name'/>"
"  <Option name='PASSWORD' type='string' description='Password'/>"
"  <Option name='HOST' type='string' description='Server hostname'/>"
"  <Option name='TABLES' type='string' description='Restricted set of tables to list (comma separated)'/>"
"</OpenOptionList>");

        poDriver->SetMetadataItem( GDAL_DMD_CREATIONOPTIONLIST, "<CreationOptionList/>");

        poDriver->SetMetadataItem( GDAL_DS_LAYER_CREATIONOPTIONLIST,
    "<LayerCreationOptionList>"
    "  <Option name='OVERWRITE' type='boolean' description='Whether to overwrite an existing table with the layer name to be created' default='NO'/>"
    "  <Option name='LAUNDER' type='boolean' description='Whether layer and field names will be laundered' default='YES'/>"
    "  <Option name='PRECISION' type='boolean' description='Whether fields created should keep the width and precision' default='YES'/>"
    "  <Option name='GEOMETRY_NAME' type='string' description='Name of geometry column.' default='SHAPE'/>"
    "  <Option name='SPATIAL_INDEX' type='boolean' description='Whether to create a spatial index' default='YES'/>"
    "  <Option name='FID' type='string' description='Name of the FID column to create' default='OGR_FID' deprecated_alias='MYSQL_FID'/>"
    "  <Option name='FID64' type='boolean' description='Whether to create the FID column with BIGINT type to handle 64bit wide ids' default='NO'/>"
    "  <Option name='ENGINE' type='string' description='Database engine to use.'/>"
    "</LayerCreationOptionList>");
        
        poDriver->SetMetadataItem( GDAL_DMD_CREATIONFIELDDATATYPES, "Integer Integer64 Real String Date DateTime Time Binary" );
        poDriver->SetMetadataItem( GDAL_DCAP_NOTNULL_FIELDS, "YES" );
        poDriver->SetMetadataItem( GDAL_DCAP_DEFAULT_FIELDS, "YES" );

        poDriver->pfnOpen = OGRMySQLDriverOpen;
        poDriver->pfnIdentify = OGRMySQLDriverIdentify;
        poDriver->pfnCreate = OGRMySQLDriverCreate;
        poDriver->pfnUnloadDriver = OGRMySQLDriverUnload;

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

示例11: GetGDALDriverManager

Handle<Value> GDALDrivers::count(const Arguments& args)
{
	HandleScope scope;

	int gdal_count = GetGDALDriverManager()->GetDriverCount();
	int ogr_count = OGRSFDriverRegistrar::GetRegistrar()->GetDriverCount();

	return scope.Close(Integer::New(gdal_count + ogr_count));
}
开发者ID:Mofangbao,项目名称:node-gdal,代码行数:9,代码来源:gdal_drivers.cpp

示例12: GetGDALDriverManager

	Format::Format(const char* name, const char* driver, const char* extension, int w, int h, int b)
	{
		mName      = name;
		mDriver    = GetGDALDriverManager()->GetDriverByName(driver);
		mExtension = extension;
		mTileW     = w;
		mTileH     = h;
		mTileB     = b;
	}
开发者ID:xavierholt,项目名称:razormill,代码行数:9,代码来源:Format.cpp

示例13: GDALRegister_WEBP

void GDALRegister_WEBP()

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

    GDALDriver *poDriver = new GDALDriver();

    poDriver->SetDescription( "WEBP" );
    poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );
    poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "WEBP" );
    poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_webp.html" );
    poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "webp" );
    poDriver->SetMetadataItem( GDAL_DMD_MIMETYPE, "image/webp" );
    poDriver->SetMetadataItem( GDAL_DMD_CREATIONDATATYPES, "Byte" );

    poDriver->SetMetadataItem( GDAL_DMD_CREATIONOPTIONLIST,
"<CreationOptionList>\n"
"   <Option name='QUALITY' type='float' description='good=100, bad=0' default='75'/>\n"
#if WEBP_ENCODER_ABI_VERSION >= 0x0100
"   <Option name='LOSSLESS' type='boolean' description='Whether lossless compression should be used' default='FALSE'/>\n"
#endif
"   <Option name='PRESET' type='string-select' description='kind of image' default='DEFAULT'>\n"
"       <Value>DEFAULT</Value>\n"
"       <Value>PICTURE</Value>\n"
"       <Value>PHOTO</Value>\n"
"       <Value>DRAWING</Value>\n"
"       <Value>ICON</Value>\n"
"       <Value>TEXT</Value>\n"
"   </Option>\n"
"   <Option name='TARGETSIZE' type='int' description='if non-zero, desired target size in bytes. Has precedence over QUALITY'/>\n"
"   <Option name='PSNR' type='float' description='if non-zero, minimal distortion to to achieve. Has precedence over TARGETSIZE'/>\n"
"   <Option name='METHOD' type='int' description='quality/speed trade-off. fast=0, slower-better=6' default='4'/>\n"
"   <Option name='SEGMENTS' type='int' description='maximum number of segments [1-4]' default='4'/>\n"
"   <Option name='SNS_STRENGTH' type='int' description='Spatial Noise Shaping. off=0, maximum=100' default='50'/>\n"
"   <Option name='FILTER_STRENGTH' type='int' description='Filter strength. off=0, strongest=100' default='20'/>\n"
"   <Option name='FILTER_SHARPNESS' type='int' description='Filter sharpness. off=0, least sharp=7' default='0'/>\n"
"   <Option name='FILTER_TYPE' type='int' description='Filtering type. simple=0, strong=1' default='0'/>\n"
"   <Option name='AUTOFILTER' type='int' description=\"Auto adjust filter's strength. off=0, on=1\" default='0'/>\n"
"   <Option name='PASS' type='int' description='Number of entropy analysis passes [1-10]' default='1'/>\n"
"   <Option name='PREPROCESSING' type='int' description='Preprocessing filter. none=0, segment-smooth=1' default='0'/>\n"
"   <Option name='PARTITIONS' type='int' description='log2(number of token partitions) in [0..3]' default='0'/>\n"
#if WEBP_ENCODER_ABI_VERSION >= 0x0002
"   <Option name='PARTITION_LIMIT' type='int' description='quality degradation allowed to fit the 512k limit on prediction modes coding (0=no degradation, 100=full)' default='0'/>\n"
#endif
"</CreationOptionList>\n" );

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

    poDriver->pfnIdentify = WEBPDataset::Identify;
    poDriver->pfnOpen = WEBPDataset::Open;
    poDriver->pfnCreateCopy = WEBPDataset::CreateCopy;

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

示例14: GDALDriver

 // Test that GDALWarp() detects error in flush cache
 template<> template<> void object::test<9>()
 {
     GDALDriver* poDriver = new GDALDriver();
     poDriver->SetDescription("DatasetWithErrorInFlushCache");
     poDriver->pfnCreate = DatasetWithErrorInFlushCache::Create;
     GetGDALDriverManager()->RegisterDriver( poDriver );
     const char* args[] = { "-of", "DatasetWithErrorInFlushCache", NULL };
     GDALWarpAppOptions* psOptions = GDALWarpAppOptionsNew((char**)args, NULL);
     GDALDatasetH hSrcDS = GDALOpen("../gcore/data/byte.tif", GA_ReadOnly);
     CPLErrorReset();
     CPLPushErrorHandler(CPLQuietErrorHandler);
     GDALDatasetH hOutDS = GDALWarp("/", NULL, 1, &hSrcDS, psOptions, NULL);
     CPLPopErrorHandler();
     GDALClose(hSrcDS);
     GDALWarpAppOptionsFree(psOptions);
     ensure(hOutDS == NULL);
     ensure(CPLGetLastErrorType() != CE_None);
     GetGDALDriverManager()->DeregisterDriver( poDriver );
     delete poDriver;
 }
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:21,代码来源:test_gdal.cpp

示例15: GDALRegister_COSAR

/* register the driver with GDAL */
void GDALRegister_COSAR() {
	GDALDriver *pDriver;
	if (GDALGetDriverByName("cosar") == NULL) {
		pDriver = new GDALDriver();
		pDriver->SetDescription("COSAR");
		pDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
			"COSAR Annotated Binary Matrix (TerraSAR-X)");
		pDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
			"frmt_cosar.html");
		pDriver->pfnOpen = COSARDataset::Open;
		GetGDALDriverManager()->RegisterDriver(pDriver);
	}
}
开发者ID:0004c,项目名称:node-gdal,代码行数:14,代码来源:cosar_dataset.cpp


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