From c5bbe274e4540e8c710b24dbf0528cf6020c7673 Mon Sep 17 00:00:00 2001 From: Justin Terry Date: Tue, 1 Mar 2022 15:09:56 -0800 Subject: [PATCH] Update Pro coverage layer --- src/main/resources/raster-catalog-pro.json | 2 +- .../scala/org/globalforestwatch/layers/GFWProCoverage.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/raster-catalog-pro.json b/src/main/resources/raster-catalog-pro.json index c6f6fd65..3d2079b1 100644 --- a/src/main/resources/raster-catalog-pro.json +++ b/src/main/resources/raster-catalog-pro.json @@ -74,7 +74,7 @@ }, { "name":"gfwpro_forest_change_regions", - "source_uri":"s3://gfw-data-lake/gfwpro_forest_change_regions/v20210129/raster/epsg-4326/{grid_size}/{row_count}/bit_encoding/gdal-geotiff/{tile_id}.tif" + "source_uri":"s3://gfw-data-lake/gfwpro_forest_change_regions/v20220228/raster/epsg-4326/{grid_size}/{row_count}/bit_encoding/gdal-geotiff/{tile_id}.tif" }, { "name":"landmark_indigenous_and_community_lands", diff --git a/src/main/scala/org/globalforestwatch/layers/GFWProCoverage.scala b/src/main/scala/org/globalforestwatch/layers/GFWProCoverage.scala index 57359331..8d8de0c5 100644 --- a/src/main/scala/org/globalforestwatch/layers/GFWProCoverage.scala +++ b/src/main/scala/org/globalforestwatch/layers/GFWProCoverage.scala @@ -12,12 +12,12 @@ case class GFWProCoverage(gridTile: GridTile, kwargs: Map[String, Any]) uriForGrid(gridTile) def lookup(value: Int): Map[String, Boolean] = { - val bits = "0000000" + value.toBinaryString takeRight 8 + val bits = "00000000" + value.toBinaryString takeRight 8 Map( "South America" -> (bits(6) == '1'), "Legal Amazon" -> (bits(5) == '1'), "Brazil Biomes" -> (bits(4) == '1'), - "Cerrado Biomes" -> (bits(3) == '1'), + "Cerrado Biomes" -> (bits(7) == '1'), "South East Asia" -> (bits(2) == '1'), "Indonesia" -> (bits(1) == '1') )