-
Notifications
You must be signed in to change notification settings - Fork 6
Add new VEDA dataset: Annual land cover maps for 2001 and 2020 #226
Comments
@dfelikson can these files be reprocessed/re-uploaded with the |
@anayeaye - done! Files were renamed to |
@dfelikson great, this one looks good |
The usual way is to have just |
@dfelikson is there any specific cover image you want to use for this dataset? And, can you also please tell me if there are specific colors that you wish to use for the various classes in this dataset? The netlify preview link shows the colors i selected for the preview. |
@vlulla - the data isn't showing up for me on the netlify preview for some reason. I'll get back to you about the cover image. |
@dfelikson since the data extent is so small you will have to click at the marker on Bangladesh to zoom to a level where the data shows up. Do you see the maker in/near Bangladesh? |
Thanks @vlulla! That worked and I see the data. Here's the info I got for this dataset:
Could you help us adjust the colors? And is there a way to label the colors using the descriptions above? |
@dfelikson I ran into lots of issues when I tried setting the colors you mentioned. Attached is a gif demonstrating some issues that I found when I was trying to view the cog (scrolling in my local session...indicating some issues with overviews) with the color scheme you recommended. So, asking my more experienced colleagues, @moradology and @ividito, to help me with this they concluded, after a couple of hours of deep dive, that there appears to be some issues with the cog itself. This is our experience of trying to verify that there weren't some underlying issues with the cog. @moradology and @ividito can provide more context where I've still missed some important details from our explorations. Here's what we tried:
From this it appears that the tif is not a cloud optimized geotiff. Can you please verify that the command |
Right, the 2001 file seems to be broken: https://staging-raster.delta-backend.com/cog/validate?url=s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD.cog.tif |
I see. I am still unsure why the complete map (colors appear only in patches) does not show up with the defined colors for 2020 cog when I click, and zoom to, the marker. I have to zoom in quite a bit before the fully colored map shows up. It's the same thing as in the gif above...but i can show it at our meeting today too. Maybe this is another issue? |
@j08lue and @vlulla - I can't reproduce this issue. I ran Is it possible that this is an issue with the way that the map visualization interpolates the data when zooming in/out? |
Interesting. For me |
Maybe you, @dfelikson, are running the test on the original ("master") copy of the file, while you, @vlulla, downloaded it from S3? It could be that the file got broken during upload. That would also explain why the online validation fails: https://staging-raster.delta-backend.com/cog/validate?url=s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD.cog.tif |
Colors based on recommendation listed in discussion at NASA-IMPACT/veda-data-pipelines#226
Wait, my mistake! Actually, even the first version of the dataset seems to pass COG validation online. Caching or so tricked me - sorry about that - https://staging-raster.delta-backend.com/cog/validate?url=s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD.cog.tif actually returns this: {
"Path": "s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD.cog.tif",
"Driver": "GTiff",
"COG": true,
"Compression": null,
"ColorSpace": null,
"COG_errors": null,
"COG_warnings": null,
"Profile": {
"Bands": 1,
"Width": 1037,
"Height": 1312,
"Tiled": true,
"Dtype": "uint16",
"Interleave": "BAND",
"AlphaBand": false,
"InternalMask": false,
"Nodata": 65535,
"ColorInterp": [
"gray"
],
"ColorMap": false,
"Scales": [
1
],
"Offsets": [
0
]
},
"GEO": {
"CRS": "EPSG:4326",
"BoundingBox": [
88.02591469087191,
20.742099910319755,
92.68367943903164,
26.63504817414382
],
"Origin": [
88.02591469087191,
26.63504817414382
],
"Resolution": [
0.004491576420597609,
-0.004491576420597609
],
"MinZoom": 6,
"MaxZoom": 8
},
"Tags": {
"Image Metadata": {
"AREA_OR_POINT": "Area"
},
"Image Structure": {
"INTERLEAVE": "BAND",
"LAYOUT": "COG"
}
},
"Band Metadata": {
"Band 1": {
"Description": null,
"ColorInterp": "gray",
"Offset": 0,
"Scale": 1,
"Metadata": {}
}
},
"IFD": [
{
"Level": 0,
"Width": 1037,
"Height": 1312,
"Blocksize": [
512,
512
],
"Decimation": 0
},
{
"Level": 1,
"Width": 518,
"Height": 656,
"Blocksize": [
512,
512
],
"Decimation": 2
},
{
"Level": 2,
"Width": 259,
"Height": 328,
"Blocksize": [
512,
512
],
"Decimation": 4
}
]
} and the same for So the file was not broken online and it is tiled, too ( |
@dfelikson we have ingested the v2 tif that you shared. It appears to be a valid cog. I have also made the color changes that you recommended. However, there appears to be some rendering issue with the map when I use these custom colors. I have briefly described the issue at https://github.com/NASA-IMPACT/delta-config/issues/141 . Additionally, while exploring the validate endpoint we (me and @ividito) observed that validation fails when we use the staging endpoint (https://staging-raster.delta-backend.com/cog/validate?url=s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD_v2.cog.tif) but passes when we use the dev endpoint (https://dev-raster.delta-backend.com/cog/validate?url=s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD_v2.cog.tif). We are unsure what is causing this issue. And, with the demo being so close we were very reluctant to modify anything at this late stage. We will definitely look into this strange behavior after the demo. cc @j08lue |
I should stop guessing. Can we look at the tiler logs and see what is happening? First of all, do the requests fail or return transparent images? Just one note: For categorical maps, you need to make sure to use
|
I don't know how, or why, but now both the links:
are working! |
@dfelikson to fix the issue with gaps in the rendered image, we need to re-compute the overviews in the two files, this time with a resampling method that preserves the classes, like E.g.
Maybe we could simply replace the ingested COGs with new ones, then no changes in the ingested records are required. But new files are fine, too. Perhaps call them like the original files, but without the |
@dfelikson kindly shared the land cover files with us here. We can perhaps transform them to COGs and upload them ourselves to see whether things work then? |
These are the original tif and cogs in qgis. I don't understand why there's Original tifCOG tifModified COG tif |
Thanks for helping look into this, @vlulla! I don't know why there are values of 15 in the original dataset, either. The original creator (Augusto Getirana) is out of office until the 5th but I'll ask him once he's back. |
Hi @dfelikson and @vlulla, As a solution, either you can merge them together with value 100, or you can ignore them. Please let me know if you want me to do it from my side. |
Hi @nbiswasuw and @dfelikson, While I could fix it for this landcover dataset i am reluctant to make these changes myself. Here are the reasons for my reluctance:
It is only fortuitous that I stumbled upon this data issue when I opened this lc image in qgis after a lot of exasperation! I'm unsure if I'll be this lucky again. Therefore, can you please fix this issue on your end? |
OK, thanks for your reply, @vlulla. |
@nbiswasuw it'll be great if you can share the geotiff and cog. It'll be great to use your cog to verify that my cogification is not creating any unexpected issues. Thanks in advance. |
Will you mind grabbing the datasets from this link? |
I downloaded the geotiffs and cog and am surprised to see that there are still rendering issues with the cog. When I zoom in the classes get filled up but when i zoom to layer the image does not render correctly. It appears that my earlier suspicion was wrong...sorry! COGGeotiff |
From the layer name it appears that this is the regular geotiff. The geotiff renders correctly for me too...it's the cog that has the rendering issue. Can you please verify that the cog renders correctly on arcgis? Sorry for the hassle. |
Re-posting this, just in case: Btw, you do not need any |
Interesting. It appears that creating a cog with |
After speaking with @ividito and @smohiudd it appears that the easiest, and quickest, fix for this rendering issue might be to replace the old cogs in the s3 bucket with the newer ones, with the same name. This way the dashboard will pick up these newer cogs and hopefully the rendering issues will get resolved. Attached are the cogs which render correctly in qgis and hoping that they work on the dashboard too. And, even though you already know it, the paths1 for these cogs are: So @dfelikson, do you want to try out this simpler method and see if this solves our problem? If so, here's the zip with the cogs created using @j08lue 's recommendation: bd-cogs-20221207.zip Footnotes
|
@vlulla - just to make sure I understand correctly ... you'd like me to take the COGs from bd-cogs-20221207.zip and upload them to I can try to do that but last time I tried overwriting the files on the S3 bucket, I don't think it actually overwrote with my new files. That's why I used " If you confirm, I'll try to re-upload and we'll see if it actually overwrites this time ... |
@dfelikson you are correct. If uploading these new cogs with the same name[s] does not resolve the rendering issue, then you can upload a |
Alright - @vlulla - take a look when you have the chance. |
Holy smokes @dfelikson that seems to have done it! Dashboard link (ctrl+click OR cmd+click to open in new tab). Thanks everyone! Anyways, it is not at all clear to me what i/we did that made this work. The smallest example that encapsulates the strangeness of this whole undertaking that I can summarize is this: $ gdal_translate -of COG -co OVERVIEW_RESAMPLING=mode -co COMPRESS=LZW MODIS_LC_2001.v3.tif tst-with-mode.tif
$ gdal_translate -of COG -co COMPRESS=LZW MODIS_LC_2001.v3.tif tst-without-mode.tif
$ ## Nothing's different...but somehow there is a rendering issue in qgis (but not in arcgis) and dashboard rendering
$ diff <(gdalinfo tst-with-mode.tif) <(gdalinfo tst-without-mode.tif)
$ gdal_translate --version
GDAL 3.5.3, released 2022/10/21 It is very likely that I am missing something obvious but I don't know what that is. Anyhow, now that this is done can we close this issue? |
Great to see that it is working finally. |
I'll take the liberty to close this issue and track further improvements in a separate one. |
Identify the point of contact and ensure someone is providing them updates: @dfelikson and @j08lue
Identify data location:
s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2001_BD.cog.tif
s3://veda-data-store-staging/EIS/COG/coastal-flooding-and-slr/MODIS_LC_2020_BD.cog.tif
Number of items: 2
Notes: This will be displayed with a slider so the user can contrast the two maps.
Verify that files are valid COGs (e.g. with
rio cogeo validate
): @dfelikson verified withrio cogeo validate
Gather STAC collection metadata
modis-annual-ld-2001-2020
Annual land cover maps for 2001 and 2020
MODIS_LC_2001_BD.cog.tif: {"start_datetime": "2003-01-01T00:00:00+00:00", "end_datetime": "2003-12-31T23:59:00+00:00"}
MODIS_LC_2020_BD.cog.tif: {"start_datetime": "2020-01-01T00:00:00+00:00", "end_datetime": "2020-12-31T23:59:00+00:00"}
false
none
Review and follow https://github.com/NASA-IMPACT/cloud-optimized-data-pipelines/blob/main/OPERATING.md
Open PR for publishing those datasets to the Staging API:
Notify QA / move ticket to QA state
Once approved, merge and close.
Resources on metadata
If not already familiar with these conventions for generating STAC collection and item metadata:
- Collections: NASA-IMPACT/veda-backend#29 and STAC version 1.0 specification for collections
- Items: NASA-IMPACT/veda-backend#28 and STAC version 1.0 specification for items
- NOTE: The delta-backend instructions are specific to datasets for the climate dashboard, however not all datasets are going to be a part of the visual layers for the dashboard so you can ignore the instructions that are specific to "dashboard" extension, "item_assets" in the collection and "cog_default" asset type in the item.
The text was updated successfully, but these errors were encountered: