EXTRACT_COUNTRIES

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES

NAME

extract_countries − Extract country polygons from the DCW database

SYNOPSIS

extract_countries [ code1 code2 ...] [ −L[s] ] [ −V ] [ > outfile ]

DESCRIPTION

extract_countries reads the Digital Charts of the World data base and extracts a multi-segment data table for the countries that match the given code(s). The output format is of the form (lon, lat) which may be plotted with psxy −M.

OPTIONS

codes

One or more 2-character country codes (see −L for codes). −L Just display all the countries and their codes, sorted by continent. No data are extracted. Append s to include list of available states as well.

−V

Report progress and final statistics to stderr [Default is silent].

EXAMPLES

To extract a polygon file for the country of the Central African Republic (code CF) and plot it in red on top of your map, try

extract_countries CF −V | psxy −R −J −O −M −Gred >> map.ps

To extract a polygon file for both France and Germany (code FR and DE) and use them to only retain the points in the file data.dat inside the two countries, try

extract_countries FR DE −V > pol.d
gmtselect data.dat −Fpol.d > inside.d

To extract a polygon file for California , try

extract_countries US.CA −V > california.d