Closed popovs closed 2 months ago
Currently have scratch code written out to process all forestry layers except for rasterized age class layer. Need to wrap into neat functions to then apply functions to whole den list.
Also, removed cutblocks layer from analysis. The data is simply too inaccurate to use - it relies on polygons of cut block approval areas, but doesn't necessarily align with actual areas cut IRL, e.g. wildlife retention patches aren't necessarily included in the layer.
Create the following functions for yearly data subsetting:
Then when calling GIS operations, user can specify whether they'd like to subset geometries by year or not.
Question for Mary: for %age age class within 1.5 km of the den, are we talking about % of forest cover, or % of TOTAL area. E.g. if a den is by the coast (OUT_Kung_3 in screenshot), and you expand 1.5km to include the ocean, the % age class coverage by total area will likely be small, even though 100% of the forest is old (age class 9).
For now, assuming percentages as a proportion of forest cover, rather than as proportion of total area.
Question for Mary, regarding road density & distance to nearest road: what to do with railroads?
First draft of all scripts written up and pushed to main. Will open new ticket for any script cleanups or new script requests.
For the dens 'field visits' layer, automate GIS verifications for the forestry columns.
First, develop functions to pull the following GIS layers from BCGW:
Next do some basic GIS operations to make these files usable for our particular verifications:
'''Segments & sections might be identical - check this
GIS verifications
[x] Proportion forestry within 60m of den
Buffer points by 60 m
Intersect with the forestry verification raster layer.
Exact extract the proportion forested (%) within 60m of the den.
Note <40yo areas OR cutblock areas OR rocky areas = "non forested"; >40yo areas = "forested".
[x] Distance to <40yo forest
For each den & year, point distance to nearest raster value where forest <40yo (follow MAMU methodology for distance from sea to inland areas)
Confirm if we care about distance around barriers
If the raster cells are too 'blocky'/low res and produce weird values for distance, use alt method with distance to single <40yo multipolygon feature.
[x] Distance to >40yo forest
Same methodology as above, but for the older >40yo forest age class.
[x] Distance to nearest built road
Point distance to nearest line.
Misc GIS
Mary additionally requested the following: "Proportion of forest age classes within 1.5 km of each den."
[x] Proportion age class within 1.5 km of each den
Buffer den by 1.5 km
Exact extract with rasterized age class polygons
Convert number of cells to percentages for each age class
[x] Road density within 1.5km of each den
Buffer den by 1.5 km
Intersect/select touching roads
Buffer highways by 30m and other road segments by 10m > dissolve boundaries
Intersect 1.5km circle with buffered roads
Calculate sq km of road within that intersection