# ----------------------------------------------------
# slope-too-steep--uk.yml
# yml configuration file to create GPKG vector file 
# of areas too steep (> 5 degrees) for solar farms
# ----------------------------------------------------

# Link to this GitHub code repository 
# This can be used to host yml files on an open data server and automatically install required library just-in-time
codebase:
  https://github.com/SH801/opendem.git

# Link to Mapzen Terrarium bucket on AWS (RGB-encoded PNGs)
source:
  https://s3.amazonaws.com/elevation-tiles-prod/terrarium/${z}/${x}/${y}.png

# Directory where downloaded tiles and temporary data are stored
cache_dir:
  cache/opendem

# Bounding box in WGS84 coordinates: [min_lon, min_lat, max_lon, max_lat]
bounds:
  [-9.0, 49.0, 2.0, 61.0]

# The horizontal pixel size of the output raster in meters
resolution:
  50

# External URL or path to a geometry file used to crop the output to a specific shape
clipping:
  https://github.com/open-wind/openwindenergy/raw/refs/heads/main/overall-clipping.gpkg

# The GDAL operation to run (e.g., slope, aspect, hillshade, roughness)
process:
  slope

# The exact name and extension of the final file generated
output:
  solar-slope-too-steep--uk.gpkg

# Filters the final result values, e.g. degrees for slope
mask:
  # Minimum excessive slope is 5 degrees
  min: 
    5.001
  
  # Maxium excessive slope is 90 degrees
  max: 
    100