GRASS logo

NAME

r.in.geoglam - Lists and downloads GEOGLAM Crop Monitor raster maps from the GEOGLAM ArcGIS WMTS tile service.

KEYWORDS

raster, import, OGC web services, OGC WMTS, crop monitor, GEOGLAM

SYNOPSIS

r.in.geoglam
r.in.geoglam --help
r.in.geoglam [-lw] [crop=string] [year=integer] [month=integer] [output=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-l
List available crop/year/month datasets and exit
-w
Download the whole extent of the dataset instead of the current computational region
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

crop=string
Crop or synthesis product to download
Options: Maize, Millet, Rice, Sorghum, Soybean, Synthesis, Wheat
year=integer
Year of the crop condition report
month=integer
Month of the crop condition report
Options: 1-12
output=name
Name for output raster map

Table of contents

DESCRIPTION

r.in.geoglam lists and downloads raster maps published by the GEOGLAM Crop Monitor (AMIS and Early Warning) ArcGIS tile server. The server publishes one map service per crop (or the multi-crop Synthesis product) and per monthly report, each available as an OGC WMTS tile layer. Internally r.in.geoglam reuses r.in.wms (driver WMTS_GRASS) to fetch and reproject the RGB tiles.

The tile server only serves pre-rendered cartography (a handful of fixed legend colours), not the underlying condition codes. r.in.geoglam therefore reads the service's own ArcGIS legend (crop condition class names and their exact swatch colours), classifies every pixel to the nearest legend colour with r.mapcalc, and discards the intermediate RGB bands. The output is a single categorical (CELL) raster with GEOGLAM category labels (r.category) and the original legend colours (r.colors) attached directly to the map — not the raw imagery.

Use the -l flag to list all crop/year/month combinations currently published by the server:

r.in.geoglam -l

To download a dataset, set crop, year, month and output. By default the data is clipped to the current computational region:

g.region n=40 s=30 e=40 w=20 res=0:06
r.in.geoglam crop=Synthesis year=2023 month=10 output=synthesis_2023_10

Use the -w flag to instead download the whole extent of the dataset (the current computational region is left untouched):

r.in.geoglam -w crop=Maize year=2026 month=06 output=maize_2026_06_world

NOTES

Category codes are fixed across all datasets, in decreasing order of severity, regardless of the order the server's legend happens to list them in:
1  Exceptional
2  Favourable
3  Watch
4  Poor
5  Failure
6  Out of Season
7  No Data

Not every dataset uses every class (for example the Synthesis product has no Failure class, which only applies to Early Warning countries); only the classes actually present in a given service's legend are attached to its output raster.

Classification is a nearest-legend-colour match per pixel; a small number of anti-aliased boundary pixels between adjacent country polygons may be assigned to a neighbouring class. Pixels outside any rendered country polygon (ocean, no data tile) are NULL.

The list of available crop/year/month combinations, and each dataset's legend, are retrieved live from the server, so newly published reports (or legend changes) become available to r.in.geoglam without any change to the module.

REQUIREMENTS

r.in.geoglam requires r.in.wms and the gdalwarp and gdaltransform utilities from the GDAL/OGR library.

EXAMPLES

List available datasets

r.in.geoglam -l

Download wheat conditions for a region

g.region n=55 s=45 e=40 w=20 res=0:06
r.in.geoglam crop=Wheat year=2022 month=10 output=wheat_2022_10

Download the global synthesis product

r.in.geoglam -w crop=Synthesis year=2023 month=10 output=synthesis_2023_10_world

SEE ALSO

r.in.wms, r.category, r.colors, r.mapcalc

AUTHOR

Yann Chemin

SOURCE CODE

Available at: r.in.geoglam source code (history)

Accessed: Monday Jul 27 12:29:34 2026


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual