While developing custom map algebra in GeoTools, I adopted Jiffle. (see : Creating custom Operation for encapsulating some map algebra using GeoTools?)
This allowed very easy implementation of logic but two major issued raised:
- Jiffle as stated here does all calculations using double values
- Dumping to GeoTIFF the output ++can take a lot of time++: more than one would expect.
This is how I dump a GridGoverage2D from a Jiffle process.
[.. jiffleProcess defined ouside this snippet ..] Map<String, Object> output = jiffleProcess.execute(inputs, null); GridCoverage2D ndviCoverage = (GridCoverage2D) output.get(JiffleProcess.OUT_RESULT); File outputNDVIGeoTIFF = new File("NDVI.tif"); GridCoverageWriter writerNDVI = geotiffFormat.getWriter(outputNDVIGeoTIFF); writerNDVI.write((GridCoverage) ndviCoverage, null);
So the questions are:
- Can file saving time be shortened in any way? (I mean from GeoTools / Jiffle perspective, not hardware one)
.. but more important:
- Is there any way to have Jiffle output GridCoverage2D in float to reduce the bits required to store data ?