Skip to main content
Question

I want to convert each date of NDVI value of area in csv format any idea please ?

  • October 1, 2019
  • 2 replies
  • 26 views

I have download B4 and B8 band from S3 and create NDVI image but unable to convert in CSV

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • October 1, 2019

That sounds like quite a complex project. Can you give us any more details? For example, what structure do you want the CSV file to be? And when you say "unable to convert" can you tell us what have you tried and what happens? Does it fail with an error? Or is the data just the wrong structure? The more information you can provide, the more likely it is we will be able to give a useful response.


helmoet
Forum|alt.badge.img+8
  • 195 replies
  • October 1, 2019

Hi @bariavijit250, You could use a RasterCellCoercer in point mode and let the band values extract as Z-values. Then use a CoordinateExtractor to get x,y,z values and write them out using a csv writer.

Some points to consider:

  • Sentinel produces vaste amounts of data, so you might want to put a RasterResampler in front of the RasterCellCoercer to (temporarily) reduce the size of it for experimenting reasons (use percentage mode, something like 1%)
  • Depending on the type of raster (bands) you can use a RasterInterpretationCoercer to create a numeric (real64 or so) raster in stead of an RGB three band raster.
  • An RGB raster might also contain a palette, you probably want to get rid of that using a RasterPaletteResolver
  • Or remove the B4 and B8 bands to keep just the band holding the NDVI values if you were combining the B4/B8 bands and then used the RasterExpressionEvaluator to generate the NDVI band.
  • If there is no geolocation in the raster, you will probably need to use an AffineWarper or a Scaler/Offsetter combination to get it onto the right place on Earth.
  • If you use some exotic Excel that reads decimal points as thousand separator, like I do, you could replace them using a StringReplacer on the x,y,z coordinates.
  • I'm not sure in the end this will work.

Good luck and have fun, this is nice stuff.