Skip to content
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

Species layer bugs #1

Open
edwardsmarc opened this issue Sep 11, 2024 · 4 comments
Open

Species layer bugs #1

edwardsmarc opened this issue Sep 11, 2024 · 4 comments

Comments

@edwardsmarc
Copy link

Found 3 ECCC layers where the values get set to objectid values due to a bug in the python prep script. Found these using:

rij_list <- c("C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_ECCC_CH.rds", 
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_ECCC_SAR.rds")
rij_list2 <- c("C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_IUCN_AMPH.rds",
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_IUCN_BIRD.rds",
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_IUCN_MAMM.rds",
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_IUCN_REPT.rds",
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_NSC_END.rds",
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_NSC_SAR.rds",
              "C:/Data/PRZ/WTW_DATA/NAT_1KM/biod/RIJ_NSC_SPP.rds")

for(rij in rij_list){
  x <- readRDS(rij)
  for(i in 1:length(rownames(x))){
    if(max(x[i,] > 100)){
      print(paste0(rownames(x)[i], " ----> ", max(x[i,])))
    }
  }
}
for(rij in rij_list2){
  x <- readRDS(rij)
  for(i in 1:length(rownames(x))){
    if(max(x[i,] > 1)){
      print(paste0(rownames(x)[i], " ----> ", max(x[i,])))
    }
  }
}

Layers that need fixing are:

T_NAT_ECCC_CH_END_COSEWIC_846

  • Some squares in the map are set to 200 instead of 100. Fix: set all values > 200 to 100 ha

T_NAT_ECCC_CH_THR_COSEWIC_951

  • Data are point counts all with small <0.5 ha buffers. Every value got set to a unique objectid. Fix: set all values to 1 ha

T_NAT_ECCC_SAR_NOS_COSEWIC_882

  • Just the values on the edge of the range got set to object id. Fix: set everything > 100 to 100
@DanWismer
Copy link
Contributor

Thanks for flagging these layers Marc.

Looking at T_NAT_ECCC_SAR_NOS_COSEWIC_882.

The source data is an oval with 1 vertex
image

When I intersect with the vector grid, it creates a bunch of these slivers and a random little oval:
image

So this is whats causing the values on the edge of the range to > 100. Some double, tripping counting going on.
image

I dissolve the feature, and its still giving those slivers. Really odd. Is this some weird bug in Pro?

@DanWismer
Copy link
Contributor

I am currently using arcpy.analysis.Intersect. I tried arcpy.analysis.PairwiseIntersect and it gave the expected output

image

Still need to wrap my head around the difference between the two different intersect tools in Pro...

@DanWismer
Copy link
Contributor

DanWismer commented Oct 10, 2024

Looking at T_NAT_ECCC_CH_END_COSEWIC_846 There are two polygons that overlap. This is causing a double count to 200 ha.

This turtle has two SARA status, 3 & 2 whic must be an error in the source data?
image

The recovery strategy doc says this turtle is threated (SARA 3)
https://wildlife-species.canada.ca/species-risk-registry/virtual_sara/files/plans/rs_blandings_turtle_e_final.pdf

Found a few more with same COSEWIC ID but different SARA status OR different English names: CH

  • 1047, Eastern Whip-poor-will and Whip-poor-will (no overlap)
  • 980, Red Knot rufa subspecies and Red Knot Rufa subspecies (no overlap)
  • 277, Massasuga, SARA 2 and SARA 3 (no overlap)

@DanWismer
Copy link
Contributor

Looking at T_NAT_ECCC_CH_THR_COSEWIC_951 the Chimney swift data are tiny little circles. Likely buffers around nests?

image

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

No branches or pull requests

2 participants