Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in indices calculation #2

Open
enomis-dev opened this issue Jul 26, 2021 · 0 comments
Open

Error in indices calculation #2

enomis-dev opened this issue Jul 26, 2021 · 0 comments

Comments

@enomis-dev
Copy link

enomis-dev commented Jul 26, 2021

Hi Syamkakarla, I have a suggestion for you, in your notebook https://github.com/syamkakarla98/Satellite_Imagery_Analysis/blob/main/code/Sundarbans_Satellite_Imagery_Analysis_using_Python.ipynb

Before calculating indices you should convert the bands to float otherwise you will have many problems.
When calculating normalization, for instance, at the numerator you have band1-band2 but if you are using uint data type you are not allowed to use negative values and you will have a wrong computation (actually you have just a warning).
For instance, in the NDVI you get 1 for water areas, you should have values near to -1. If you do:
arr_st = arr_st.astype(float) you'll get a correct value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant