Skip to content

Log out-of-bounds features#129

Open
jpolchlo wants to merge 3 commits into
wri:developfrom
jpolchlo:feature/log-oob-features
Open

Log out-of-bounds features#129
jpolchlo wants to merge 3 commits into
wri:developfrom
jpolchlo:feature/log-oob-features

Conversation

@jpolchlo

@jpolchlo jpolchlo commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

If inputs contain geometries that do not intersect the tree cover loss raster extent, those geometries will be lost. If the input contains only non-intersecting geometries, ForestChangeDiagnoticCommand will fail outright.

Issue Number: N/A

What is the new behavior?

I introduce a complementary join to ValidatedFeatureRDD that will identify geometries that have no intersection with the tree cover loss extent, and will track their feature IDs as NoIntersectionErrors. These will be propagated into the output.

Does this introduce a breaking change?

  • Yes
  • No

Other information

A test input containing only two out-of-bounds geometries yields the following final output:

list_id location_id     status_code     location_error  tree_cover_loss_total_yearly    tree_cover_loss_primary_forest_yearly   tree_cover_loss_peat_yearly     tree_cover_loss_intact_forest_yearly    tree_cover_loss_protected_areas_yearly  tree_cover_loss_sea_landcover_yearly    tree_cover_loss_idn_landcover_yearly    tree_cover_loss_soy_yearly      tree_cover_loss_idn_legal_yearly        tree_cover_loss_idn_forest_moratorium_yearly    tree_cover_loss_prodes_yearly   tree_cover_loss_prodes_wdpa_yearly      tree_cover_loss_prodes_primary_forest_yearly    tree_cover_loss_brazil_biomes_yearly    tree_cover_extent_total tree_cover_extent_primary_forest        tree_cover_extent_protected_areas       tree_cover_extent_peat  tree_cover_extent_intact_forest natural_habitat_primary natural_habitat_intact_forest   total_area      protected_areas_area    peat_area       brazil_biomes   idn_legal_area  sea_landcover_area      idn_landcover_area      idn_forest_moratorium_area      south_america_presence  legal_amazon_presence   brazil_biomes_presence  cerrado_biome_presence  southeast_asia_presence indonesia_presence      commodity_value_forest_extent   commodity_value_peat    commodity_value_protected_areas commodity_threat_deforestation  commodity_threat_peat   commodity_threat_protected_areas        commodity_threat_fires
266     1       3       ["NoIntersectionError"] {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     {}      {}      {}      {}      0.0     false   false   false   false   false   false   {}      {}      {}      {}      {}      {}      {}
266     -1      3       ["NoIntersectionError"] {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      {}      0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     {}      {}      {}      {}      0.0     false   false   false   false   false   false   {}      {}      {}      {}      {}      {}      {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant