Hi, for customer NDVI index,
(nir-red)/(nir+red) + 0/max(0; (nir-red)/(nir+red) - 0.4)
This one to show any under 0.4 value to 0, over 0.4 are showing.
I need to do a further to show any over 0.4, change value to 1. Then only 0 and 1 will show in this index.
How can I do that? Thank you.
The clue under the workaround described in the community post I shared above is to produce a 0/0 that is defined as “Not a Number” (NaN), and considered as transparent, or just sum 0, that leaves the value the same. Any number operated with NaN is NaN. There you are computing NDVI + 0 = NDVI for the valid points, and NDVI + NaN = NaN for the “invalid”.
I am not sure if I understand your question. Do you want values between this range 0 to 1? If yes, you can take as example the community post I shared and do:
Hi, for costomer NDVI index,
(nir-red)/(nir+red) + 0/max(0; (nir-red)/(nir+red) - 0.4)
This one to show any under 0.4 value to 0, over 0.4 are showing.
I need to do a further to show any over 0.4, change value to 1. Then only 0 and 1 will show in this index.
How can I do that? Thank you.
No. I want if value lower 0.4, change it to 0; If value higher than 0.4, change value to 1.
Can we do that? Since we have Max(), I just can’t find the details about to write a formula.
For (nir-red)/(nir+red) + 0/max(0; (nir-red)/(nir+red) - 0)
The first part is the ndvi value. the second pard 0/xxx how it works?
Can you explain more details or do you any support documents?
Thanks for your patience. Changing values is not something we have tested. I would suggest then going with Julius’s suggestion trying with QGIS.
The second part of the formula 0/ xx is the clue under the index I explained above, but that workaround says to use values under, above, or in between. Not changing to another value.
These cookies are necessary for the website to function and cannot be switched off in our systems.
They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences,
logging in, or filling in forms. These cookies do not store any personally identifiable information.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site.
They help us to know which pages are the most and least popular and see how visitors move around the site.
All information these cookies collect is aggregated and therefore anonymous.
If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partner (Google).
They may be used by Google to build a profile of your interests and show you relevant adverts on other sites.
They do not directly store personal information but are based on uniquely identifying your browser and internet device.
If you do not allow these cookies, you will experience less targeted advertising.