PNHP / COA_Tools

1 stars 1 forks source link

Export SGCN source feature data in addition to polygons #16

Closed ChristopherTracey closed 2 years ago

ChristopherTracey commented 5 years ago

We stopped doing this for time, but it would be useful for the commissions and other potential uses.

ChristopherTracey commented 5 years ago

Done for BAMONA,

ChristopherTracey commented 5 years ago

Done for BBA point count

ChristopherTracey commented 5 years ago

Done for Brook trout

ChristopherTracey commented 5 years ago

Done for GBIF

ChristopherTracey commented 5 years ago

So this is currently the code that we are using for this:

# create a spatial layer
bamona_sf <- st_as_sf(bamona1, coords=c("Longitude","Latitude"), crs="+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0")
bamona_sf <- st_transform(bamona_sf, crs=customalbers) # reproject to the custom albers
arc.write(path=here("_data/output/SGCN.gdb","srcpt_BAMONA"), bamona_sf, overwrite=TRUE) # write a feature class into the geodatabase
bamona_buffer <- st_buffer(bamona_sf, dist=100) # buffer by 100m
arc.write(path=here("_data/output/SGCN.gdb","final_BAMONA"), bamona_buffer, overwrite=TRUE) # write a feature class into the geodatabase

We should look into turning this into a function to make it more repeatable across data sources.

ChristopherTracey commented 5 years ago

Done for Bombus/Misc SGCN

ChristopherTracey commented 5 years ago

Currently not doing this for Biotics/CPP due to data structure issues. Not sure if this is applicable to those datasets.