Getting numerical float values from a vege

Hi, I would like to obtain numerical float data from process API. I’m computing NDVI index.

function setup() {
    return {
      input: [{
          bands: [
      output: {
          bands: 1
  function evaluatePixel(samples) {
    let ndvi = index(samples.B08, samples.B04);
    return [ndvi];

I’m still receiving .png image, how can I do?

Hi @davide.brusco ,

You need to specify sampleType: "FLOAT32" for your output and request image/tiff instead of image/png. Please see the example.

1 Like

Ok fine, it works, but now i’m receiving a geotiff, can i received directly a matrix? I’m working with Node Red and there managing the images/files is a bit more complicated

Unfortunately not, the API returns PNG, JPEG, GeoTIFF, or tar file if there are multiple outputs.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.