Hi Alan,
Please can you be more specific in what you are asking. I am not sure what either visualisation is meant to be showing or where your source for the second visualisation is.
If you are looking for evalscripts to visualise NDVI or other vegetation indices, then I encourage you to read through the Custom Scripts Repository.
The second image concerns NDVI from a system called OneSoil, which uses Sentinel imagery.
I wanted to generate something like this, since the vegetative index view is clearer.
In the second image, from OneSoil, you can better see the problems that can occur in the field, such as low vegetative development due to irrigation failures, for example.
I don’t know if you can understand what I’m saying.
I can try to express myself better.
In the examples you provided the top image appears to have NDVI values classified and colours assigned to the classes. In the lower image you provided NDVI values appear to be assigned a continuous gradation of colours and so I would assume it uses a colour ramp.
Assuming that I have interpreted your question correctly, you want to apply a colour ramp to NDVI values in an EvalScript V3 script. To do this have a look at the documentation for Utility Functions. I would recommend reading about ColorRampVisualizer.
docs.sentinel-hub.com
Explore the nonstandard javascript visualizers and helper functions, that can be used in Sentinel Hub evalscript.
The example I’m including may be useful. You will have to adjust the colour ramp to suit what you are trying to do.
//VERSION=3
const ramp_data = = -1, 0xFF0000], ,0.0, 0xFFFF00], ,1.0, 0x0000FF] ];
const vis_byr = new ColorRampVisualizer(ramp_data);
function setup() {
return { input: :{ bands: :“B04”,“B08”] }], output: { bands: 3} };
}
function evaluatePixel(sample) {
return vis_byr.process( index(sample.B08, sample.B04) )
}
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.