# This file contains metadata for your plugin.

# This file should be included when you package your plugin.
# Mandatory items:

[general]
name=FAO Downloader
qgisMinimumVersion=3.0
description=Downloads WaPOR and other FAO raster data for a region of interest.
version=2.0
author=Brenden Vissers
license=GPL-3.0-or-later

email=BVissers929@gmail.com

about=This plugin gives access to raster data published by the Food and Agriculture Organization of the United Nations through the FAO GISMGR 2.0 API (data.apps.fao.org), including the WaPOR water productivity datasets and many other FAO workspaces (CHIRPS, ASIS, GAEZ, GLW and more). Users define their study region in their QGIS project and download spatial subsets of the selected datasets while the program runs in the background. Filtering, and minor statistical options are available as well.

tracker=https://github.com/bvissers/FAO-Downloader/issues
repository=https://github.com/bvissers/FAO-Downloader
# End of mandatory metadata

# Recommended items:

changelog=2.0
    - Area statistics per dataset (per date over the download extent, computed locally): average, median, mode, min, max, standard deviation, a configurable lower/upper percentile pair, a rank, and the area holding data (in km2 and as a percentage of the extent). Rasters with no data in the extent are still listed as "no data" so it is clear they were pulled
    - Statistics graphing is a set of checkboxes: tick any of Average, Median, Mode, Min, Max or the percentiles to overlay them on a single chart per dataset. Output is CSV or a single/per-dataset Excel workbook, with a configurable number of significant figures
    - Optional pre-filter for the statistics: exclude zero values, or set a lower/upper limit as a value or percentile, applied to the statistics only or to the saved rasters as well
    - A confirmation summary before each download lists the datasets, dates, extent and the statistics/filter settings in force, so a setting left on another tab cannot silently reshape the download
    - FAO default styles applied automatically: a QGIS .qml sidecar is written next to every raster (plus the original SLD per dataset). The continuous colour ramp is fitted to the min/max of the data actually downloaded across the whole set, so the colours span your area instead of the dataset's full global range
    - Migrated from the decommissioned WaPOR v1 API (io.apps.fao.org) to the FAO GISMGR 2.0 API (data.apps.fao.org)
    - Added access to the WaPOR version 3 datasets (WAPOR-3 workspace)
    - WaPOR v2 data remains available through the WAPOR-2 workspace
    - No API token / sign-up required anymore
    - Downloads read spatial subsets of Cloud Optimized GeoTIFFs directly (no more server-side crop jobs), which is faster and more reliable
    - Parallel raster downloads (configurable worker count)
    - Extent from a polygon layer, the map canvas, or a rectangle drawn on the canvas
    - Optional time series stack output per dataset (VRT, NetCDF, multiband GeoTIFF or GeoPackage)
    - Workspace dropdown shows the dataset count, lists empty workspaces last, and hides access-restricted workspaces (cached, fetched in the background)
    - Access-restricted datasets (private FAO buckets, e.g. ASIS) are skipped with a clear message instead of failing
    - WaPOR Level 3 sub-national data (10-20m) for both WaPOR v3 and v2, organised by country and site, with a "Show Level 3 sites" map button
    - Single-image "maps" (the GISMGR /maps resource: one raster, no time dimension) are now downloadable too, shown in a separate "Single maps" branch above the "Map series" branch so each workspace clearly shows which datasets are time series and which are single images (unlocks AQUASTAT, GAEZ, GLOSIS, land cover and many other previously hidden FAO layers). All selected single maps are saved together in one "Single maps" folder (one file each)
    - Workspace dataset counts now include single maps, so map-only workspaces (e.g. AQUASTAT) are no longer shown as empty
    - "Show coverage on map" now names each traced layer after the dataset it came from, and when a dataset has no overview to preview it downloads the full raster and traces that instead of falling back to the bounding box
    - "Show coverage on map" now also traces single-image maps (reprojected to the map CRS); when only Level 3 data is ticked it points to the "Show Level 3 sites" button instead of a generic message
    - "Show Level 3 sites" now zooms correctly to the sites whatever the project CRS (previously could zoom to a tiny area near the origin)
    - Right-click any item in the catalog tree to see its description/metadata (datasets, Level 3 sites, groups and the workspace itself) - replaces the old double-click. When a dataset publishes an FAO metadata/documentation page (common on single maps), the info popup shows it as a clickable link
    - "Full date range" reads just the first and last raster of each ticked dataset (now including Level 3 mosaicsets)
    - Default statistics output format is a single Excel workbook
    - Tiled "gridded" mosaicsets in non-WaPOR workspaces (RSP cropland/phenology, CROP-PI crop productivity, THU cropping intensity, GLASS leaf area index) are now downloadable: shown in a "Gridded datasets (tiled)" branch, the tiles overlapping your area of interest are clipped and merged into one raster per date. CROP-PI's crop types (Maize/Wheat) appear as separate entries. Area statistics and time series stacks work on the merged per-date rasters too. Workspace counts now include mosaicsets so these no longer show as empty
    - "Refresh workspace list and counts" button in Settings (counts also auto-refresh about once a day)
    - Dataset tree scrolls horizontally for long dataset names instead of truncating them
    - "Show coverage on map" traces the actual data footprint of each ticked dataset (polygonised from a low-resolution overview) and adds it to the map
    - Larger dialog and tidier layout (widened by about a third so long dataset names and the catalog tree have more room)
    - The dialog is now resizable: drag any edge and the whole layout scales to fit; the previous size is the minimum
    - Scale, offset, unit and no-data handling now come from per-raster API metadata
    - Cumulative dekadal values use the exact number of days reported by the API
    - Option to add downloaded rasters to the map automatically, organised under a layer group named after the download run with a sub-group per dataset, so a large batch stays tidy in an existing project
    - Cancelling stops the download promptly: queued rasters are dropped and the few in-flight ones abort mid-read instead of running to completion
    - The progress panel shows the live download speed (MB/s) and an estimated time remaining
    - Errors are reported in cross-platform message boxes (no more Windows-only popups)

# Tags are comma separated with spaces allowed
tags=python,raster,wapor,fao,water,remote sensing,download

homepage=https://github.com/bvissers/FAO-Downloader
category=Web
icon=icon.png
# experimental flag
experimental=False

# deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False

# Since QGIS 3.8, a comma separated list of plugins to be installed
# (or upgraded) can be specified.
# Check the documentation for more information.
# plugin_dependencies=

# Category of the plugin: Raster, Vector, Database or Web
# category=

# If the plugin can run on QGIS Server.
server=False
