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 ); }
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 ); }
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 ); } }
SEXP RGDAL_GetDriver(SEXP sxpDriverName) { const char *pDriverName = asString(sxpDriverName); installErrorHandler(); GDALDriver *pDriver = (GDALDriver *) GDALGetDriverByName(pDriverName); uninstallErrorHandlerAndTriggerError(); if (pDriver == NULL) error("No driver registered with name: %s\n", pDriverName); SEXP sxpHandle = R_MakeExternalPtr((void *) pDriver, mkChar("GDAL Driver"), R_NilValue); return(sxpHandle); }
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); }
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 ); } }
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 ); } }
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 ); }
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 ); }
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 ); } }
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; }
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 ); }
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 ); }
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 ); } }
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 ); }
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); } }
extern void GDALRegister_RASDAMAN() { GDALDriver *poDriver; if( GDALGetDriverByName( "RASDAMAN" ) == NULL ) { poDriver = new GDALDriver(); poDriver->SetDescription( "RASDAMAN" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "RASDAMAN" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_rasdaman.html" ); poDriver->pfnOpen = RasdamanDataset::Open; GetGDALDriverManager()->RegisterDriver( poDriver ); } }
BIGGIFDataset::~BIGGIFDataset() { FlushCache(); if( hGifFile ) DGifCloseFile( hGifFile ); if( fp != NULL ) VSIFCloseL( fp ); if( poWorkDS != NULL ) { CPLString osTempFilename = poWorkDS->GetDescription(); GDALClose( (GDALDatasetH) poWorkDS ); poWorkDS = NULL; GDALDriver *poGTiff = (GDALDriver *) GDALGetDriverByName( "GTiff" ); poGTiff->Delete( osTempFilename ); } }
void GDALRegister_FAST() { GDALDriver *poDriver; if( GDALGetDriverByName( "FAST" ) == NULL ) { poDriver = new GDALDriver(); poDriver->SetDescription( "FAST" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "EOSAT FAST Format" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_fast.html" ); poDriver->pfnOpen = FASTDataset::Open; GetGDALDriverManager()->RegisterDriver( poDriver ); } }
GDALDriverH QgsRasterCalculator::openOutputDriver() { char **driverMetadata; //open driver GDALDriverH outputDriver = GDALGetDriverByName( mOutputFormat.toLocal8Bit().data() ); if ( outputDriver == NULL ) { return outputDriver; //return NULL, driver does not exist } driverMetadata = GDALGetMetadata( outputDriver, NULL ); if ( !CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) ) { return NULL; //driver exist, but it does not support the create operation } return outputDriver; }
void GDALRegister_GSC() { GDALDriver *poDriver; if( GDALGetDriverByName( "GSC" ) == NULL ) { poDriver = new GDALDriver(); poDriver->SetDescription( "GSC" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "GSC Geogrid" ); // poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, // "frmt_various.html#GSC" ); poDriver->pfnOpen = GSCDataset::Open; GetGDALDriverManager()->RegisterDriver( poDriver ); } }
void GDALRegister_SDE() { if( !GDAL_CHECK_VERSION( "SDE driver" ) ) return; if( GDALGetDriverByName( "SDE" ) != NULL ) return; GDALDriver *poDriver = new GDALDriver(); poDriver->SetDescription( "SDE" ); poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "ESRI ArcSDE" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#SDE" ); poDriver->pfnOpen = SDEDataset::Open; GetGDALDriverManager()->RegisterDriver( poDriver ); }
GDALDriverH QgsRelief::openOutputDriver() { char **driverMetadata = nullptr; //open driver GDALDriverH outputDriver = GDALGetDriverByName( mOutputFormat.toLocal8Bit().data() ); if ( !outputDriver ) { return outputDriver; //return nullptr, driver does not exist } driverMetadata = GDALGetMetadata( outputDriver, nullptr ); if ( !CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) ) { return nullptr; //driver exist, but it does not support the create operation } return outputDriver; }
void GDALRegister_ISIS2() { GDALDriver *poDriver; if( GDALGetDriverByName( "ISIS2" ) == NULL ) { poDriver = new GDALDriver(); poDriver->SetDescription( "ISIS2" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "USGS Astrogeology ISIS cube (Version 2)" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#ISIS2" ); poDriver->pfnOpen = ISIS2Dataset::Open; GetGDALDriverManager()->RegisterDriver( poDriver ); } }
void GDALRegister_LOSLAS() { GDALDriver *poDriver; if( GDALGetDriverByName( "LOSLAS" ) == NULL ) { poDriver = new GDALDriver(); poDriver->SetDescription( "LOSLAS" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "NADCON .los/.las Datum Grid Shift" ); poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" ); poDriver->pfnOpen = LOSLASDataset::Open; poDriver->pfnIdentify = LOSLASDataset::Identify; GetGDALDriverManager()->RegisterDriver( poDriver ); } }
void GDALRegister_BAG() { if( !GDAL_CHECK_VERSION("BAG") ) return; if( GDALGetDriverByName("BAG") != nullptr ) return; GDALDriver *poDriver = new GDALDriver(); poDriver->SetDescription("BAG"); poDriver->SetMetadataItem(GDAL_DCAP_RASTER, "YES"); poDriver->SetMetadataItem(GDAL_DMD_LONGNAME, "Bathymetry Attributed Grid"); poDriver->SetMetadataItem(GDAL_DMD_HELPTOPIC, "frmt_bag.html"); poDriver->pfnOpen = BAGDataset::Open; poDriver->pfnIdentify = BAGDataset::Identify; GetGDALDriverManager()->RegisterDriver(poDriver); }
void GDALRegister_FAST() { if( GDALGetDriverByName( "FAST" ) != NULL ) return; GDALDriver *poDriver = new GDALDriver(); poDriver->SetDescription( "FAST" ); poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "EOSAT FAST Format" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_fast.html" ); poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" ); poDriver->pfnOpen = FASTDataset::Open; GetGDALDriverManager()->RegisterDriver( poDriver ); }
void GDALRegister_PALSARJaxa() { if( GDALGetDriverByName( "JAXAPALSAR" ) != NULL ) return; GDALDriver *poDriver = new GDALDriver(); poDriver->SetDescription( "JAXAPALSAR" ); poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "JAXA PALSAR Product Reader (Level 1.1/1.5)" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_palsar.html" ); poDriver->pfnOpen = PALSARJaxaDataset::Open; poDriver->pfnIdentify = PALSARJaxaDataset::Identify; poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" ); GetGDALDriverManager()->RegisterDriver( poDriver ); }
void GDALRegister_ACE2() { if( GDALGetDriverByName( "ACE2" ) != NULL ) return; GDALDriver *poDriver = new GDALDriver(); poDriver->SetDescription( "ACE2" ); poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "ACE2" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_various.html#ACE2" ); poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "ACE2" ); poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" ); poDriver->pfnOpen = ACE2Dataset::Open; poDriver->pfnIdentify = ACE2Dataset::Identify; GetGDALDriverManager()->RegisterDriver( poDriver ); }
void GDALRegister_Leveller() { if( GDALGetDriverByName( "Leveller" ) != NULL ) return; GDALDriver *poDriver = new GDALDriver(); poDriver->SetDescription( "Leveller" ); poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" ); poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "ter" ); poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "Leveller heightfield" ); poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "frmt_leveller.html" ); poDriver->pfnIdentify = LevellerDataset::Identify; poDriver->pfnOpen = LevellerDataset::Open; poDriver->pfnCreate = LevellerDataset::Create; GetGDALDriverManager()->RegisterDriver( poDriver ); }