Meteo Grid Statistics

QGIS 3 polygon statistics for meteorological NetCDF, GRIB and GeoTIFF grids.

Quick start / 使用步骤

  1. 格点文件: Browse to a raster, then select a variable/subdataset.
  2. 时间 / 波段: Check the time steps/bands to process.
  3. 面矢量文件: Choose a polygon file, its layer and an identifier field.
  4. 统计指标: Select count, minimum, maximum, mean, median, sum, population standard deviation, population variance or range.
  5. 合理值范围: Optional limits use decoded values after scale/offset. Out-of-range values are excluded by default. NaN/Inf and NoData are always excluded.
  6. 导出格式 / 输出路径: Choose GeoJSON, Shapefile or CSV and a new filename. Existing files are not overwritten.
  7. 开始统计: Run in the background. Use 取消任务 to cancel.

默认按像元中心归属,结果为“面 × 波段”长表。结果坐标系为 EPSG:4326。缺失 CRS 的规则经纬度 NetCDF 会推定 WGS84,并在定位说明和 .warnings.json 中提醒。

Results and assumptions

One row per valid polygon and band. NoData is excluded; a polygon with no valid cells has count 0 and null statistics. Invalid geometry and non-polygons are skipped with a warning. Overlapping polygons are independent, holes are excluded and statistics are not area weighted.

Geometry is transformed to the raster CRS for calculation; exported geometry is EPSG:4326. Recovered NetCDF coordinates are treated as cell centers. A missing CRS is assumed WGS84 only for recognizable regular geographic coordinate arrays, with explicit warnings. No time is invented from filenames.

Preview shows up to 500 rows and warnings; exports and the companion .warnings.json are complete. CSV includes WKT; Shapefile contains short field names and UTF-8 sidecars.

Limits and troubleshooting

Small example

Inside the installed plugin folder, open samples/grid.asc and samples/zones.geojson. Select the name field and all statistics. The “full” polygon contains values 1–16: count 16, mean 8.5, median 8.5, sum 136, population variance 21.25. The “outside” polygon has no data and triggers NO_PIXELS.

Source code and bundled synthetic examples are GPL-3.0-or-later. See LICENSE and README.en.md. Report problems through the plugin's metadata issue tracker once a public release has been configured.