GADM.dataread
— Methoddataread(path)
Read data in path
returned by download
.
GADM.download
— Methoddownload(country; version="4.1")
Downloads data for country
using DataDeps.jl and returns path. The data is provided by the API of the GADM project.
It is possible to choose the API version by passing it to the version
keyword argument as string. The available API versions are: 4.1 (default), 4.0, 3.6 and 2.8.
GADM.filterlayer
— Methodfilterlayer(data, qkeys, qvalues)
Filter layer's rows that satisfies the query params qkeys
and qvalues
.
GADM.get
— MethodGADM.get(country, subregions...; depth=0, version="4.1")
Returns a Tables.jl columntable for the requested region.
Geometry of the region(s) can be accessed with the key geom
.
The geometries are GeoInterface
-compliant Polygons/MultiPolygons.
- country: ISO 3166 Alpha 3 country code
- subregions: Full official names in hierarchial order (provinces, districts, etc.)
- depth: Number of levels below the last subregion to search, default = 0
Examples
using GADM
# columntable of size 1, data of India's borders
data = GADM.get("IND")
# columntable of all states and union territories inside India
data = GADM.get("IND"; depth=1)
# columntable of all districts inside Uttar Pradesh
data = GADM.get("IND", "Uttar Pradesh"; depth=1)
GADM.getdataset
— Methodgetdataset(country; version="4.1")
Downloads and extracts dataset of the given country code
GADM.getlayer
— Methodgetlayer(data, level)
Get layer of the desired level
from the data
.
GADM.isvalidcode
— Methodisvalidcode(str)
Tells whether or not str
is a valid ISO 3166 Alpha 3 country code. Valid code examples are "IND", "USA", "BRA".