-
Notifications
You must be signed in to change notification settings - Fork 65
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
segCount for 'all' 'loss' and 'gain' disturbance #24
Comments
@Mcflyuu's code from email thread
Attached images: |
Can reproduce: https://code.earthengine.google.com/7c7396190dc4b3fa4f8aa0af6e62650a
|
I suspect the problem is that the array returned from Line 1151 in de1f5f4
Line 1173 in de1f5f4
The solution may be to mask value -9999 from the input array in |
@Mcflyuu I wonder if you would help test a fix? In my test, the count seems to be correct now: If you replace: var ltgee = require('users/emaprlab/public:Modules/LandTrendr.js'); with var ltgee = require('users/emaprlab/public:Modules/LandTrendr-braaten-test.js'); in your script, you'll be using code that includes a proposed fix. Are the results as you expect? |
@jdbcode Of course, I'm pleased to help test the fix and I'll tell you the results soon. |
@jdbcode After my test, I found the count relationship seems to be correct now, but the running speed is relatively slower compared with the previous API, I'm not sure it is because the script or network status. In addition, I still have several questions about the segment and the segment count. Firstly, as you can see in the first picture below, when there is no loss segment and gain segment, there is still a segment of "all" from 1988 to 2020, how to understand this situation? Specially, the parameters of LandTrendr analysis precess are 1984 for startYear and 2020 for endYear, respectively, how about the remaining period of 1984 to 1988? Secondly, as shown in the second picture below, when there is only a gain segment from 1990 to 2020, there is a "all" segment from 1990 to 2020, correspondingly. How about the period of 1984 to 1990? |
I have used the LT-GEE for a while and found it's a very useful and powerful tool. Recently, I have been troubled by a problem, I ran LT-GEE API in order to get change map and segment count, including 'all', 'loss' and 'gain'. Finally three segCount maps have been obtained. From my perspective, the value for a pixel in three segCount maps should be '' 'all' = 'loss' + 'gain' ''. However, the pixels values which equal to 1 in 'all' map are also 1 in both 'loss' and 'gain' maps. I carefully checked my code but didn't find any mistakes. So I decided to write to ask for help. Any suggestions will be appreciated.
The text was updated successfully, but these errors were encountered: