# Earth Engine Configuration
earth_engine:
  cloud_threshold: 20
  scale: 10
  max_pixels: 10000000000000  # 1e13
  # Use single clearest scene for display (sharper than median); median still used for change detection
  prefer_single_scene_for_display: true
  single_scene_cloud_threshold: 15  # Stricter for clearest scene

# Analysis Thresholds
analysis:
  ndbi_threshold: 0.1
  ndvi_threshold: 0.2
  water_mask_mndwi_threshold: 0.0
  min_area_m2: 50              # Filter noise; use 25 for street-level focus
  min_area_street_focus_m2: 25  # When radius <= 300m for finer encroachment
  street_focus_radius_threshold_m: 300

# Map Settings
map:
  center: [26.9124, 75.7873]  # Jaipur
  zoom_start: 12
  zoom_street_focus: 18       # For property/street-level analysis
  layer_opacity: 0.7
  # Radius (meters): smaller = more focused for house/street encroachment
  default_radius_street_m: 200   # Property/street-level default
  default_radius_city_m: 1000    # Wide-area default
  min_radius_m: 50               # Minimum for very focused single-property
  max_radius_m: 5000

# Thumbnail resolution and quality
thumbnails:
  dimensions_wide: 1024      # City-wide timeline
  dimensions_focused: 4096   # Street/property focus
  dimensions_evidence: 2048  # Always use for baseline vs current (min quality, no distortion)
  focus_radius_threshold_m: 500
  apply_sharpening: false    # Off by default; can accentuate pixelation on 10m data

# App Settings
app:
  title: "JDA Encroachment Monitor"
  baseline_year_default: 2018
  current_year_default: 2024
  # Extended year range: Landsat 5/7 from 2000, Sentinel-2 from 2017
  allowed_years: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025]
  # Timeline years shown on the visual timeline slider (subset for clarity)
  timeline_display_years: [2000, 2005, 2010, 2013, 2015, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025]

# AI/ML Analysis Configuration
ai:
  # OpenAI GPT model for report generation (set OPENAI_API_KEY in .env)
  model: "gpt-4o-mini"
  # Enable AI-powered analysis (requires OPENAI_API_KEY)
  enabled: true
  # Auto-generate ML classification (always available, no API needed)
  ml_classification: true
  # Maximum tokens for AI report
  max_tokens: 2000

# Auto-capture settings for historical imagery
auto_capture:
  enabled: true
  # Years to auto-capture (will use best available source per year)
  # Set to null to use all available years
  default_years: [2005, 2010, 2013, 2015, 2017, 2019, 2021, 2023, 2024]
  # Maximum concurrent Earth Engine requests
  max_concurrent: 3

# Road Encroachment Analysis Configuration
road_encroachment:
  shapefile_path: "SectorRoads/SectorRoads.shp"
  source_crs: "EPSG:32643"
  buffer_multiplier: 1.0          # Scale factor for buffer widths
  min_encroachment_area_m2: 10    # Ignore tiny overlaps (noise)
  severity_thresholds:
    critical: 50    # >50% buffer encroached
    high: 30        # >30%
    medium: 15      # >15%
    low: 0          # >0%
  width_comparison:
    enabled: true
    tolerance_m: 2  # Acceptable deviation in meters

# Optional protected-areas layer (environmental/ecological/forest boundaries)
# When enabled and path set, khasra points and land change intersecting these areas are flagged.
protected_areas:
  enabled: false
  # Path to GeoJSON or Shapefile, or URL (e.g. https://.../boundaries.geojson)
  path: null

# Capture and analysis history storage
storage:
  data_dir: "data"
  captures_subdir: "captures"
  db_file: "data/analysis_history.db"
