GRASS logo

NAME

v.in.gadm - Downloads GADM global administrative boundaries and imports them.

KEYWORDS

vector, import, administrative boundaries, GADM

SYNOPSIS

v.in.gadm
v.in.gadm --help
v.in.gadm [-lfo] url=string directory=name [layer=string] [output=name] [extent=string] [snap=float] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-l
List available layers in the GADM GeoPackage and exit
-f
Force re-download and re-extraction of the GADM archive
-o
Override projection check (use current project's projection)
--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:

url=string [required]
URL of the GADM GeoPackage zip archive
Default: https://geodata.ucdavis.edu/gadm/gadm4.1/gadm_410-gpkg.zip
directory=name [required]
Directory to store the downloaded and extracted GADM data
Default: $HOME/GISDATA
layer=string
Name of the layer within the GADM GeoPackage to import
output=name
Name for output vector map
extent=string
Output extent
Options: input, region
Default: input
input: Raster/Vector map extent
region: Current region extent
snap=float
Snapping threshold for boundaries
A suitable threshold is estimated during import if not specified

Table of contents

DESCRIPTION

v.in.gadm downloads the GADM 4.1 global administrative boundaries GeoPackage archive, extracts it, and imports one of its layers into the current GRASS project/mapset using v.import.

By default the archive is downloaded from https://geodata.ucdavis.edu/gadm/gadm4.1/gadm_410-gpkg.zip into directory (default $HOME/GISDATA). If a matching archive already exists in that directory it is reused; use the -f flag to force a fresh download and extraction.

The default archive contains a single layer (gadm_410) holding all 356,508 administrative boundary features worldwide, at their finest available level, with one attribute column per administrative level (GID_0/NAME_0 for the country, GID_1/NAME_1 for the first subdivision, and so on up to level 5). When the GeoPackage contains only one layer it is selected automatically; the layer option only needs to be set for GeoPackages that hold several layers (e.g. per-country GADM downloads). Use the -l flag to list the layer names available in the downloaded GeoPackage without importing anything.

Since all administrative levels are already columns of a single flat layer, splitting out a given level (e.g. country boundaries only) is a matter of running v.extract or v.dissolve on the imported map using the corresponding GID_/NAME_ column, rather than of choosing a different layer name.

EXAMPLES

Import the GADM boundaries (downloads the archive into $HOME/GISDATA if not already present, and auto-selects the single available layer):
v.in.gadm output=gadm_410
Limit the import to the current region:
v.in.gadm output=gadm_410 extent=region
Dissolve the imported boundaries to the country level (GID_0):
v.dissolve input=gadm_410 column=GID_0 output=gadm_countries
List the layers available in the GADM GeoPackage without importing:
v.in.gadm -l
Force re-download of the archive, e.g. after a new GADM release:
v.in.gadm -f output=gadm_410

SEE ALSO

v.import, v.in.ogr, v.extract, v.dissolve

AUTHORS

Yann Chemin

SOURCE CODE

Available at: v.in.gadm source code (history)

Accessed: Sunday Sep 13 08:30:12 2026


Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

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