-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from wri/develop
Develop to master
- Loading branch information
Showing
22 changed files
with
334 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/scala/org/globalforestwatch/layers/AbovegroundCarbon2000.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.globalforestwatch.layers | ||
|
||
import org.globalforestwatch.grids.GridTile | ||
|
||
case class AbovegroundCarbon2000(gridTile: GridTile, model: String = "standard", kwargs: Map[String, Any]) | ||
extends FloatLayer | ||
with OptionalFLayer { | ||
|
||
val datasetName = "gfw_aboveground_carbon" | ||
|
||
val uri: String = | ||
uriForGrid(gridTile, kwargs) | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/scala/org/globalforestwatch/layers/BelowgroundCarbon2000.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.globalforestwatch.layers | ||
|
||
import org.globalforestwatch.grids.GridTile | ||
|
||
case class BelowgroundCarbon2000(gridTile: GridTile, model: String = "standard", kwargs: Map[String, Any]) | ||
extends FloatLayer | ||
with OptionalFLayer { | ||
|
||
val datasetName = "gfw_belowground_carbon" | ||
|
||
val uri: String = | ||
uriForGrid(gridTile, kwargs) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/scala/org/globalforestwatch/layers/PlantationsPre2000.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.globalforestwatch.layers | ||
|
||
import org.globalforestwatch.grids.GridTile | ||
import org.globalforestwatch.layers.{BooleanLayer, OptionalILayer} | ||
|
||
case class PlantationsPre2000(gridTile: GridTile, kwargs: Map[String, Any]) | ||
extends BooleanLayer | ||
with OptionalILayer { | ||
|
||
val datasetName = "Na" | ||
|
||
val uri: String = | ||
s"s3://gfw2-data/climate/carbon_model/other_emissions_inputs/IDN_MYS_plantation_pre_2000/processed/20200724/${gridTile.tileId}_plantation_2000_or_earlier_processed.tif" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/scala/org/globalforestwatch/layers/TropicalTreeCover.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.globalforestwatch.layers | ||
|
||
import org.globalforestwatch.grids.GridTile | ||
|
||
case class TropicalTreeCover(gridTile: GridTile, kwargs: Map[String, Any]) | ||
extends IntegerLayer | ||
with OptionalILayer { | ||
val datasetName = "wri_tropical_tree_cover" | ||
override val internalNoDataValue: Int = 255 | ||
override val externalNoDataValue: Integer = 255 | ||
|
||
val uri: String = | ||
uriForGrid(gridTile, kwargs) | ||
|
||
override def lookup(value: Int): Integer = { | ||
value match { | ||
case v if v < 10 => 0 | ||
case v if v < 20 => 10 | ||
case v if v < 30 => 20 | ||
case v if v < 40 => 30 | ||
case v if v < 50 => 40 | ||
case v if v < 60 => 50 | ||
case v if v < 70 => 60 | ||
case v if v < 80 => 70 | ||
case v if v < 90 => 80 | ||
case v if v <= 100 => 90 | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/scala/org/globalforestwatch/layers/UmdGlobalLandcover.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.globalforestwatch.layers | ||
|
||
import org.globalforestwatch.grids.GridTile | ||
|
||
case class UmdGlobalLandcover(gridTile: GridTile, kwargs: Map[String, Any]) | ||
extends StringLayer | ||
with OptionalILayer { | ||
val datasetName = "umd_land_cover" | ||
override val externalNoDataValue = "Other" | ||
|
||
val uri: String = | ||
uriForGrid(gridTile, kwargs) | ||
|
||
override def lookup(value: Int): String = { | ||
value match { | ||
case v if v == 1 => "Grassland" | ||
case v if v == 2 => "Forest" | ||
case v if v == 3 => "Wetlands" | ||
case v if v == 4 => "Cropland" | ||
case v if v == 5 => "Settlements" | ||
case v if v == 6 => "Other" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.