-
Notifications
You must be signed in to change notification settings - Fork 10
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
Integrated alert testing tile cache URL (1a) #1235
Comments
Here are some data set specific notes to be aware of: While the Red, Green, and Blue channels are the same as for RADD/GLADL/GLADS2, we are also making use of the alpha channel now. The front end needed to know if the alert had been detected by multiple systems, so we provide that, with an important caveat: It's slightly fake. Here the explanation I put in the code that generates the alpha channel:
|
@k-kresek I setup a new Dataset and Layer but it looks like I need the metadata for the Integrated alert layer. For example, tree cover uses https://production-api.globalforestwatch.org/v1/gfw-metadata/tree_cover. Whenever you get a chance is this something you could please setup for me? |
Yes! We will need to connect to the integrated alerts metadata using the metadata key - I will check and see what this is. |
For integrated alerts, we should the 'gfw_integrated_alerts' metadata key. |
@k-kresek Would you happen to have an example of what the integrated layer should look like in the map? This is what I'm seeing on the map when I bring the integrated alert layer in, is this correct? |
Here is a pre-production version of the integrated alerts: https://preproduction.globalforestwatch.org/map/?map=eyJjZW50ZXIiOnsibGF0IjotMTYuMDc4MjQ1MzE4MDQzODQsImxuZyI6LTQwLjU1ODU5Mzc0OTk5ODY5fSwiZGF0YXNldHMiOlt7ImRhdGFzZXQiOiJpbnRlZ3JhdGVkLWRlZm9yZXN0YXRpb24tYWxlcnRzLThiaXQiLCJvcGFjaXR5IjoxLCJ2aXNpYmlsaXR5Ijp0cnVlLCJsYXllcnMiOlsiaW50ZWdyYXRlZC1kZWZvcmVzdGF0aW9uLWFsZXJ0cy04Yml0Il19LHsiZGF0YXNldCI6InBvbGl0aWNhbC1ib3VuZGFyaWVzIiwibGF5ZXJzIjpbImRpc3B1dGVkLXBvbGl0aWNhbC1ib3VuZGFyaWVzIiwicG9saXRpY2FsLWJvdW5kYXJpZXMiXSwib3BhY2l0eSI6MSwidmlzaWJpbGl0eSI6dHJ1ZX1dfQ%3D%3D There are several different filters that we would like to maintain, such as the date slider, the ability to show select alert systems, and the confidence identification. |
Here is some additional encoding info from Daniel: d = days since 2014/12/31 R: floor (d / 255) To extract date, confidence and intensity d = R * 255 + G |
Here's the link I posted in the chat, to Vizzuality's decode JS: https://github.com/Vizzuality/gfw/blob/develop/providers/datasets-provider/config.js#L225-L286 |
@k-kresek I have been working through this layer and have run into an issue with the tiles coming across. The tiles for https://tiles.globalforestwatch.org/gfw_integrated_alerts/latest/default/{z}/{x}/{y}.png are coming across blank. Since we extract rgb values from the canvas and interpolate them on the front-end, I'm unable to generate the correct outputs such as date, confidence level and intensity. Here is an example of one of the tiles, https://tiles.globalforestwatch.org/gfw_integrated_alerts/v20220205/default/3/3/3.png. Tiles that should be populated with rgb values are showing up as blank. For example, for the glad alerts the tiles are coming back with values. Here is an example of one of those tiles, https://tiles.globalforestwatch.org/glad_prod/tiles/3/2/4.png. |
@davidlstarr Hi David, I think I can solve one mystery for you: The tiles aren't actually BLANK, they're just LIGHT. If you look really closely you can see the shadow of an image there. It would appear darker but we're using the Alpha channel (interpreted as opacity) to store data, and the values are mostly small. This means if you look at the images in an image viewer expecting a standard PNG it will appear highly transparent (/light). But the Red, Green, and Blue channels have data which can be decoded. |
@dmannarino I see what you are saying but I’m not seeing any red values come across on my end. This doesn’t make sense to me. The glad alerts do not act that way and there are red values that come across. I manually set the red value just so I could see a color come across on the tile and these are the results...I used https://tiles.globalforestwatch.org/gfw_integrated_alerts/v20220205/default/3/3/3.png as the test tile. There are no red values coming across for that tile. This is what shows in the map, if I manually set the red value Every single r value coming across is 0....something is def off. I'm just not sure what it is... Is there a JS developer on your team that could help with the matter? |
@dmannarino Also, I manually set the alpha value to full opacity and left the other values as-is (rgb) and I'm still not seeing anything come across onto the canvas. The only way I'm seeing graphics in the map is by setting the red values manually. |
@davidlstarr Hi David, sorry for the delay in replying. |
@dmannarino When you get a chance could you provide us with the code you used to spit out the rgba values for https://tiles.globalforestwatch.org/gfw_integrated_alerts/v20220205/default/3/3/3.png? I appreciate it! |
This should do it. Let me know if you have any problems with it:
|
I was able to successfully bring in the correct rgba pixels, filter out the specified date range and confidence levels. I'm currently working on the layer selector, timeslider, date range picker, and confidence toggles. Here is the current test link to see my progress: https://alpha.blueraster.io/gfw-mapbuilder/pull-requests/rw-layers-fix/ |
@k-kresek When you get an opportunity could you please test out the new functionality for the gfw layers on https://alpha.blueraster.io/gfw-mapbuilder/pull-requests/integrated-alert-layer/? Thanks! |
Hey David! Thank you so much for your work on this so far! Here are a couple of initial comments I have:
Let me know what you think! Thanks, |
@k-kresek I completed 3/4 items. I wasn't quite sure on item 2. Any further info would be helpful. Thanks! |
Hey David! Thank you, I will test! For item 2, I was thinking that the midpoint circle should be the same size as the two endpoint circles so that people can navigate the slider a bit easier. I kind of see now that the slider circle moves with the slider and isn't necessarily always marking the two endpoints. I think it's alright to leave it the way it is - however now all the dates that are on the bottom of the slider are 3-21-2022 which doesn't match what the top slider dates are when you switch the dates. So, I think we can leave the circle slider style the same, but fix the dates that are shown on the bottom so they match the date shown when you hover over that part of the slider. |
Oooh! I just saw that it is different years. I think in that case it is alright, we can leave it as is. |
This is the testing URL for the GFW Integrated Deforestation Alert layer, which combines the GLAD-S, GLAD and RADD alert layers.
Tile cache URL: https://dev-tiles.globalforestwatch.org/gfw_integrated_alerts/latest/default/{z}/{x}/{y}.png
Note that's a link to a dev environment tile cache, it's not in production yet.
The text was updated successfully, but these errors were encountered: