CGAZ() returns the DSN, a shapefile of geo boundaries, CGAZ_sql() returns SQL suitable for use with GDAL, for the names or codes of countries.

CGAZ()

CGAZ_sql(codes)

Arguments

codes

a list of iso3 country codes, or country names (this is a bit sketchy)

Examples

CGAZ_sql(c("Australia", "New Zealand"))
#> [1] "SELECT shapeGroup FROM geoBoundariesCGAZ_ADM0 WHERE shapeGroup IN ('AUS','NZL')"
CGAZ_sql(c("AUS", "NZL"))
#> [1] "SELECT shapeGroup FROM geoBoundariesCGAZ_ADM0 WHERE shapeGroup IN ('AUS','NZL')"
## do something like gdal_raster_data(gebco(), target_res = 1,
##                                        options = c("-crop_to_cutline",
##                                        "-cutline", CGAZ(),
##                                         "-csql", CGAZ_sql(c("Australia", "New Zealand")) ))