As part of my project I’m trying to create a Graph which carries out the following process:
Takes a Sentinel-3 OLCI product as input
Removes all data which is either:
NOT fresh_inland_water mask
cloud mask
Exports the remaining data as a CSV format, or other (text) format readily usable for data analysis.
To achieve this, I’ve created a graph:
This graph works well for steps 1) and 2). However, when trying to write as a CSV, an error occurs: Not able to write product file: 'C:/…"
Writing into any other format works fine.
Additional findings:
Exporting a OCLI product as a csv by using Raster > Export > Mask Pixels DOES work
Exporting a OCLI product as a csv by using File > Export > CSV does NOT work
It seems there are at least two issues involved.
With the released SNAP version I get the same error when trying to write the entire product.
When using a subset of 500x500 pixel a different error happens.
This one is fixed in the current development version.
But still the full product can’t be written.
CSV data needs a lot of memory on disk and in RAM. And it is not well suited for writing.
So creating a subset and only write the region of interest would be a good idea.
So with the next release it will be possible at least to write subsets but if writing the entire product will be possible I can’t promise (SNAP-1342).
As a workaround you can process to BEAM-DIMAP and then export only a masked area as you already found out.
If you have many products the is not really a goo way to go. Maybe you can use python/snappy to convert to CSV?