正在进行安全检测...

发布时间:2023-11-25 22:12:39   来源:文档文库   
字号:
GDALAPITutorialBeforeopeningaGDALsupportedrasterdatastoreitisnecessarytoregisterdrivers.在打开一个GDAL支持的栅格资料之前,必需要注册驱动。Thereisadriverforeachsupportedformat.每个驱动对应各自支持的格式。NormallythisisaccomplishedwiththeGDALAllRegister(functionwhichattemptstoregisterallknowndrivers,includingthoseauto-loadedfrom.sofilesusingGDALDriverManager::AutoLoadDrivers(.通常这个会被GDALAllRegister()函数完成,试图去注册所有已知的驱动包括使用GDALDriverManager::AutoLoadDrivers(.so文件来加载。Ifforsomeapplicationsitisnecessarytolimitthesetofdriversitmaybehelpfultoreviewthecodefromgdalallregister.cpp.如果一些程序有必要去限制驱动集合,检查gdalallregister.cpp的代码将会有所帮助,PythonautomaticallycallsGDALAllRegister(whenthegdalmoduleisimported.
gdal模块被导入时,Python会自动调用GDALAllRegister(Oncethedriversareregistered,theapplicationshouldcallthefreestandingGDALOpen(functiontoopenadataset,passingthenameofthedatasetandtheaccessdesired(GA_ReadOnlyorGA_Update.一但驱动被注册,程序将会调用独立的GDALOpen()函数通过dataset的名称和需要的存取方式(GA_ReadOnlyGA_Update)来打开dataset.#include"gdal_priv.h"intmain({GDALDataset*poDataset;GDALAllRegister(;poDataset=(GDALDataset*GDALOpen(pszFilename,GA_ReadOnly;if(poDataset==NULL{...;

本文来源:https://www.2haoxitong.net/k/doc/02f152ef5ef7ba0d4a733b67.html

《正在进行安全检测....doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式