@Override public String name() { return gdalDrv != null ? gdalDrv.getShortName() : "GDAL"; }
@Override public List<String> aliases() { return gdalDrv != null ? Arrays.asList(gdalDrv.getShortName()) : (List) Collections.emptyList(); }
/** * Checks if the provided Dataset was opened by a Driver supporting the same * formats which are supported by the specific ImageReaderSpi. * * There is a trivial example: Suppose we are implementing a plugin for HDF4 * format and suppose we are testing the <code>canDecodeInput</code> with * a NITF file as input. GDAL will successfully open the NITF file. However, * it will use the NITF driver instead of the HDF4 driver. Since NITF is not * supported by the HDF4ImageReaderSpi, this method will return return * <code>false</code>. * * @param dataset * The input dataset * * @return <code>true</code> if the format is supported. * <code>false</code> otherwise. */ protected boolean isDecodable(Dataset dataset) { if (dataset != null) { final Driver driver = dataset.GetDriver(); // retrieving the format of the provided input. // We use the "Description" of the driver which has opened the // input. final String sDriver = driver.getShortName(); // checking if this format is supported by the specific SPI */ return getSupportedFormats().contains(sDriver); } return false; }
/** * Checks if the provided Dataset was opened by a Driver supporting the same * formats which are supported by the specific ImageReaderSpi. * * There is a trivial example: Suppose we are implementing a plugin for HDF4 * format and suppose we are testing the <code>canDecodeInput</code> with * a NITF file as input. GDAL will successfully open the NITF file. However, * it will use the NITF driver instead of the HDF4 driver. Since NITF is not * supported by the HDF4ImageReaderSpi, this method will return return * <code>false</code>. * * @param dataset * The input dataset * * @return <code>true</code> if the format is supported. * <code>false</code> otherwise. */ protected boolean isDecodable(Dataset dataset) { if (dataset != null) { final Driver driver = dataset.GetDriver(); // retrieving the format of the provided input. // We use the "Description" of the driver which has opened the // input. final String sDriver = driver.getShortName(); // checking if this format is supported by the specific SPI */ return getSupportedFormats().contains(sDriver); } return false; }
if (driver != null) { setDriverDescription(driver.GetDescription()); setDriverName(driver.getShortName());
if (driver != null) { setDriverDescription(driver.GetDescription()); setDriverName(driver.getShortName());
logger.log(Level.FINE,"Using the GDAL driver '" + this.gdalDriver.getLongName() + "' ("+this.gdalDriver.getShortName()+") to save the product.");
int imageHeight = gdalProduct.getRasterYSize(); MetadataElement metadataElement = new MetadataElement("Image info"); metadataElement.setAttributeString("driver", hDriver.getShortName()); metadataElement.setAttributeInt("width", imageWidth); metadataElement.setAttributeInt("height", imageHeight);