Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f52bfb2
Implement DCW collections
PaulWessel Nov 27, 2021
7c22817
Relax -R for DCW collections
PaulWessel Nov 27, 2021
b7f99e5
Add +n for listing collections
PaulWessel Nov 28, 2021
abab40a
Add named regions
PaulWessel Nov 30, 2021
cddf4f1
More checks and filename change
PaulWessel Nov 30, 2021
2deb9aa
Remove duplicate Antarctica check
PaulWessel Dec 1, 2021
b2091cc
Merge branch 'master' into dcw-collections
PaulWessel Dec 1, 2021
0455c73
Relax case checking
PaulWessel Dec 1, 2021
8a395a7
Allow country and continent names
PaulWessel Dec 1, 2021
e6617c2
Update explain_-R.rst_
PaulWessel Dec 1, 2021
5906ce3
update docs
PaulWessel Dec 1, 2021
4fc1364
More space for long coordinates
PaulWessel Dec 2, 2021
953f78a
Merge branch 'master' into dcw-collections
PaulWessel Dec 2, 2021
bb31505
Fix reallocation issue
PaulWessel Dec 5, 2021
1a0e6cb
Merge branch 'master' into dcw-collections
PaulWessel Dec 5, 2021
46592ad
Merge branch 'master' into dcw-collections
PaulWessel Dec 6, 2021
8b94700
Merge branch 'master' into dcw-collections
PaulWessel Dec 11, 2021
21cbb4e
Merge branch 'master' into dcw-collections
PaulWessel Dec 16, 2021
0e64d63
Merge branch 'master' into dcw-collections
PaulWessel Dec 29, 2021
493e1b3
Merge branch 'master' into dcw-collections
PaulWessel Jan 1, 2022
3baee67
Merge branch 'master' into dcw-collections
PaulWessel Jan 3, 2022
2a3f8b4
Merge branch 'master' into dcw-collections
PaulWessel Jan 12, 2022
b63950f
Need longer strings now
PaulWessel Jan 12, 2022
0652b2a
Update gmt_dcw.c
PaulWessel Jan 13, 2022
36455bb
Merge branch 'master' into dcw-collections
PaulWessel Jan 14, 2022
5d3ab57
Update gmt_dcw.c
PaulWessel Jan 14, 2022
f764f9f
Merge branch 'master' into dcw-collections
PaulWessel Jan 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions doc/rst/source/coast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,22 @@ Optional Arguments

.. _-E:

**-E**\ *code1,code2,...*\ [**+l**\|\ **L**][**+c**\|\ **C**][**+g**\ *fill*][**+p**\ *pen*][**+z**]
**-E**\ *code1,code2,...*\ [**+l**\|\ **L**\|\ **n**][**+c**\|\ **C**][**+g**\ *fill*][**+p**\ *pen*][**+z**]
Select painting, clipping or dumping country polygons from the Digital Chart of the World.
This is another dataset independent of GSHHG and hence the **-A** and **-D** options do not apply.
Append one or more comma-separated countries using the
`2-character ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_.
Append one or more comma-separated countries using either the
`2-character ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_
(e.g., NO for Norway) or the full country name (e.g., Norway).
To select a state of a country (if available), append .state, e.g, US.TX for Texas. To specify a
whole continent, prepend = to any of the continent codes AF (Africa),
AN (Antarctica), AS (Asia), EU (Europe), OC (Oceania),
NA (North America), or SA (South America). Append **+l** to
whole continent, prepend = to any of the continent codes AF (Africa), AN (Antarctica), AS (Asia), EU (Europe), OC (Oceania),
NA (North America), or SA (South America), or spell out the full names. To specify a collection or named region,
give either the code or the full name. Append **+l** to
just list the countries and their codes [no data extraction or plotting takes place].
Use **+L** to see states/territories for Argentina, Australia, Brazil, Canada, China, India, Russia and the US.
Finally, you can append **+l**\|\ **+L** to **-E**\ =\ *continent* or **-E**\ *code* to only list
You can append **+l**\|\ **+L** to **-E**\ =\ *continent* or **-E**\ *code* to only list
countries in that continent or country; repeat if more than one continent or country is requested.
Finally, use **+n** to list the named collections or regions, and use **-E**\ *code* to only list
collections that contains the listed codes. All names are case-insensitive.
To set up clip paths based on your selection, append **+c** or **+C** for inside or outside (area between selection
and the map boundary) clipping, respectively. To plot instead,
append **+p**\ *pen* to draw polygon outlines [no outline] and
Expand Down Expand Up @@ -271,6 +274,27 @@ Optional Arguments

.. module_common_ends

Notes
-----

The **-E** option can be expanded to take the user's own custom collections
and named regions. Users can create a dcw.conf file and place it in their
GMT user directory (typically ~/.gmt). The format of the file is the same
as the dcw-collections.txt file distributed with DCW::

# Arbitrary comments and blank lines anywhere

# The France-Italian union (2042-45) of gallery example 34.
tag: FRIT Franco-Italian Union
list: FR,IT
# Stay away from those dangerous eels!
tag: SARG Sargasso Sea
region: 70W/40W/20N/35N

Each *tag:* record must be immediately followed by either a *list:* or *region:* record.
All tags should be at least 3 characters long. Either the *tag* or the *name* (if available)
can be used to make selections in **-R** or **-E**.

Examples
--------

Expand Down
17 changes: 10 additions & 7 deletions doc/rst/source/explain_-R.rst_
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ The **-R** option defines the map region or data domain of interest. It may be s
the nature of the calling module, this mechanism will also set grid spacing and possibly the grid registration (see
:ref:`cookbook/options:Grid registration: The **-r** option`\ ).

#. **-R**\ *code1,code2,...*\ [**+e**\ \|\ **r**\ \|\ **R**\ *incs*]. This indirectly supplies the region by consulting
the DCW (Digital Chart of the World) database and derives the bounding regions for one or more countries given by
the codes. Simply append one or more comma-separated countries using the two-character
`ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_.
To select a state within a country (if available), append .state, e.g, US.TX for Texas. To specify a whole continent,
prepend **=** to any of the continent codes **AF** (Africa), **AN** (Antarctica), **AS** (Asia), **EU** (Europe),
**OC** (Oceania), **NA** (North America), or **SA** (South America). The following modifiers can be appended:
#. **-R**\ *code1,code2,...*\ [**+e**\ \|\ **r**\ \|\ **R**\ *incs*]. This indirectly supplies the region by
consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more
countries given by the codes. Simply append one or more comma-separated countries using either the two-character
`ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>`_ (e.g., NO) or the full
country name (e.g., Norway). To select a state within a country (if available), append .state (e.g, US.TX),
or the full state name (e.g., Texas). To specify a whole continent, prepend **=** to any of the continent codes
**AF** (Africa), **AN** (Antarctica), **AS** (Asia), **EU** (Europe), **OC** (Oceania), **NA** (North America),
or **SA** (South America), or spell out the full continent name. Finally, append any collection abbreviations
or full names for the extent of the collection or named region. All names are case-insensitive.
The following modifiers can be appended:

- **+r** to adjust the region boundaries to be multiples of the steps indicated by *inc*, *xinc*/*yinc*, or
*winc*/*einc*/*sinc*/*ninc* [default is no adjustment]. For example, **-R**\ *FR*\ **+r**\ 1 will select the
Expand Down
13 changes: 8 additions & 5 deletions doc/rst/source/explain_-Rgeo.rst_
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@

#. **-R**\ *code1,code2,...*\ [**+e**\ \|\ **r**\ \|\ **R**\ *incs*]. This indirectly supplies the region by
consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more
countries given by the codes. Simply append one or more comma-separated countries using the two-character
`ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>`_. To select a state within a
country (if available), append .state, e.g, US.TX for Texas. To specify a whole continent, prepend **=** to any
of the continent codes **AF** (Africa), **AN** (Antarctica), **AS** (Asia), **EU** (Europe), **OC** (Oceania),
**NA** (North America), or **SA** (South America). The following modifiers can be appended:
countries given by the codes. Simply append one or more comma-separated countries using either the two-character
`ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>`_ (e.g., NO) or the full
country name (e.g., Norway). To select a state within a country (if available), append .state (e.g, US.TX),
or the full state name (e.g., Texas). To specify a whole continent, prepend **=** to any of the continent codes
**AF** (Africa), **AN** (Antarctica), **AS** (Asia), **EU** (Europe), **OC** (Oceania), **NA** (North America),
or **SA** (South America), or spell out the full continent name. Finally, append any collection abbreviations
or full names for the extent of the collection or named region. All names are case-insensitive.
The following modifiers can be appended:

- **+r** to adjust the region boundaries to be multiples of the steps indicated by *inc*, *xinc*/*yinc*, or
*winc*/*einc*/*sinc*/*ninc* [default is no adjustment]. For example, **-R**\ *FR*\ **+r**\ 1 will select the
Expand Down
Loading