hi to everyone. In our application we must programmatically compute a FilterBand and save it as geotiff (using java)
at the moment i’m trying to do it with the following code, but the result is very very slow… it takes hours, while exporting the geotiff from snap desktop is faster (about 10 seconds to create the image showed and about 40 seconds to export the computed band in geotiff format)
Actually, your code looks quite well. Maybe your memory settings are too low.
I think if you use the GeoTiff.writeImage() method the whole image is loaded into memory at once.
You can try to create a new product, add the filtered band to the product and then write the product.
Use ProductIO.writeProduct() for this. Then the data is written tile-wise.
the result is the same… here is the output (process manually stopped after 10 minutes):
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.snap.dataio.arcbin.ArcBinGridReaderPlugIn not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.snap.binning.reader.BinnedProductReaderPlugin not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.snap.csv.dataio.reader.CsvProductReaderPlugIn not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.snap.dataio.getasse30.GETASSE30ReaderPlugIn not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.snap.dataio.pgx.PgxProductReaderPlugIn not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.snap.dataio.rtp.RawTiledPyramidsProductCodecSpi not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductReaderPlugIn: Provider org.esa.s2tbx.dataio.deimos.DeimosProductReaderPlugin not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductWriterPlugIn: Provider org.esa.snap.csv.dataio.writer.CsvProductWriterPlugIn not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductWriterPlugIn: Provider org.esa.snap.dataio.hdf5.Hdf5ProductWriterPlugIn not found
WARNING: org.esa.snap.core.util.ServiceLoader: org.esa.snap.core.dataio.ProductWriterPlugIn: Provider org.esa.snap.dataio.rtp.RawTiledPyramidsProductCodecSpi not found
SLF4J: The requested version 1.6 by your slf4j binding is not compatible with [1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
log4j:WARN No appenders could be found for logger (hsqldb.db.HSQLDB4AD417742A.ENGINE).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
filter band created
create product
create geotiff
begin task Writing bands of product 'Amplitude_VH_am3'.... work: 1
sub task name: Writing band 'Amplitude_VH_am3'
I don’t know what to do …thanks in advance for any help