本文整理了Java中org.gdal.gdal.gdal.GetDriverByName()
方法的一些代码示例,展示了gdal.GetDriverByName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。gdal.GetDriverByName()
方法的具体详情如下:
包路径:org.gdal.gdal.gdal
类名称:gdal
方法名:GetDriverByName
暂无
代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework
public Driver initialValue() {
return gdal.GetDriverByName("MEM");
}
}
代码示例来源:origin: geosolutions-it/imageio-ext
public Driver initialValue() {
return gdal.GetDriverByName("MEM");
}
}
代码示例来源:origin: io.jeo/jeo-gdal
public GDAL() {
if (INITIALIZED) {
String drvName = getGDALDriverName();
if (drvName != null) {
gdalDrv = gdal.GetDriverByName(drvName);
}
}
}
代码示例来源:origin: com.revolsys.open/com.revolsys.open.gdal
/**
* Returns <code>true</code> if a driver for the specific format is
* available. <code>false</code> otherwise.<BR>
* It is worth to point out that a successful loading of the native library
* is not sufficient to grant the support for a specific format. We should
* also check if the proper driver is available.
*
* @return <code>true</code> if a driver for the specific format is
* available. <code>false</code> otherwise.<BR>
*/
public static boolean isDriverAvailable(final String driverName) {
if (isAvailable()) {
try {
final Driver driver = gdal.GetDriverByName(driverName);
if (driver == null) {
return false;
} else {
return true;
}
} catch (final UnsatisfiedLinkError e) {
LoggerFactory.getLogger(Gdal.class).debug(
"Error loading driver: " + driverName, e);
return false;
}
} else {
return false;
}
}
代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework
driver = gdal.GetDriverByName(driverName);
} catch (UnsatisfiedLinkError e) {
if (LOGGER.isLoggable(Level.WARNING)) {
代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework
if (driversWritingCapabilities.containsKey(driverName))
return (driversWritingCapabilities.get(driverName));
final Driver driver = gdal.GetDriverByName(driverName);
try {
if (driver == null)
代码示例来源:origin: geosolutions-it/imageio-ext
driver = gdal.GetDriverByName(driverName);
} catch (UnsatisfiedLinkError e) {
if (LOGGER.isLoggable(Level.WARNING)) {
代码示例来源:origin: geosolutions-it/imageio-ext
if (driversWritingCapabilities.containsKey(driverName))
return (driversWritingCapabilities.get(driverName));
final Driver driver = gdal.GetDriverByName(driverName);
try {
if (driver == null)
代码示例来源:origin: deegree/deegree3
public Dataset extractRegionAsDataset( Envelope region, int pixelsX, int pixelsY, boolean withAlpha )
throws IOException {
byte[][] buffer = extractRegionAsByteArray( region, pixelsX, pixelsY, withAlpha );
Driver vrtDriver = gdal.GetDriverByName( "MEM" );
Dataset ds = vrtDriver.Create( "/tmp/whatever", pixelsX, pixelsY, buffer.length );
ds.SetProjection( dataset.GetProjection() );
int i = 1;
for ( byte[] bytes : buffer ) {
Band band = ds.GetRasterBand( i );
if ( band.WriteRaster( 0, 0, pixelsX, pixelsY, pixelsX, pixelsY, GDT_Byte, bytes ) != CE_None ) {
throw new RuntimeException( "Error writing raster band." );
}
i++;
}
return ds;
}
代码示例来源:origin: deegree/deegree3
private Dataset createMemDataset( Envelope nativeBbox, String nativeProjection, byte[][] composedRegion ) {
Driver vrtDriver = gdal.GetDriverByName( "MEM" );
Dataset dataset = vrtDriver.Create( "/tmp/whatever", width, height, composedRegion.length );
dataset.SetProjection( nativeProjection );
dataset.SetGeoTransform( getGeoTransform( nativeBbox, width, height ) );
for ( int i = 1; i <= dataset.getRasterCount(); i++ ) {
Band band = dataset.GetRasterBand( i );
if ( band.WriteRaster( 0, 0, width, height, width, height, GDT_Byte, composedRegion[i - 1] ) != CE_None ) {
throw new RuntimeException( "Error writing composed raster." );
}
}
return dataset;
}
代码示例来源:origin: deegree/deegree3
private Dataset reproject( Dataset src, String dstCrsWkt ) {
Driver vrtDriver = gdal.GetDriverByName( "MEM" );
Dataset region = vrtDriver.Create( "/tmp/whatever", width, height, src.getRasterCount() );
region.SetProjection( dstCrsWkt );
region.SetGeoTransform( getGeoTransform( bbox, width, height ) );
gdal.ReprojectImage( src, region );
return region;
}
代码示例来源:origin: senbox-org/s2tbx
this.gdalDriver = gdal.GetDriverByName(this.writerDriver.getDriverName());
if (this.gdalDriver == null) {
throw new NullPointerException("The GDAL driver '" + this.writerDriver.getDriverDisplayName() + "' ("+this.writerDriver.getDriverName()+") used to write the product does not exist.");
代码示例来源:origin: geosolutions-it/imageio-ext
driver = gdal.GetDriverByName(driverName);
writeDataset = driver.Create(fileName, destinationWidth,
destinationHeight, nBands, dataType, myOptions);
driver = gdal.GetDriverByName(driverName);
代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework
driver = gdal.GetDriverByName(driverName);
writeDataset = driver.Create(fileName, destinationWidth,
destinationHeight, nBands, dataType, myOptions);
driver = gdal.GetDriverByName(driverName);
代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework
final Driver driver = gdal.GetDriverByName("GTiff");
tempDs = driver.Create(tempFile, width, height, nBands, dataType,
(String[])null);
代码示例来源:origin: geosolutions-it/imageio-ext
final Driver driver = gdal.GetDriverByName("GTiff");
tempDs = driver.Create(tempFile, width, height, nBands, dataType,
(String[])null);
内容来源于网络,如有侵权,请联系作者删除!