Skip to content

Commit

Permalink
Some updates to the tables of GeoRegions
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 7, 2024
1 parent 44a398e commit 8eb6a74
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/src/lists/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resetGeoRegions(all=true);
## GeoRegions.jl's default region is the Globe

```@example listgeo
tableGeoRegions(custom=false)
tableGeoRegions(predefined=false)
```

## Giorgi & Francisco [2000]
Expand Down
40 changes: 21 additions & 19 deletions src/georegions/tables.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
"""
tableGeoRegions(;
path :: AbstractString = geodir,
defined :: Bool = true,
custom :: Bool = true
predefined :: Bool = true,
custom :: Bool = true
) -> nothing
Display all available GeoRegions in tabular format.
Keyword Arguments
=================
- `path` : The path where the list of custom GeoRegions will be retrieved from.
Defaults to the `local` package variable `geodir`
- `defined` : If true, pre-defined Giorgi, SREX and IPPC AR6 list of GeoRegions will be displayed.
- `custom` : If true, custom, user-defined list of GeoRegions will be displayed.
- `predefined` : If true, predefined Giorgi, SREX and IPPC AR6 list of GeoRegions will be displayed.
- `custom` : If true, custom, user-defined list of GeoRegions will be displayed.
"""
function tableGeoRegions(;
path :: AbstractString = geodir,
defined :: Bool = true,
custom :: Bool = true
predefined :: Bool = true,
custom :: Bool = true
)

flist = ["rectlist.txt","polylist.txt","tiltlist.txt"]
Expand All @@ -43,7 +43,7 @@ function tableGeoRegions(;
end
end

if defined
if predefined
for fname in fdefined
rvec,rtype = listgeoregions(joinpath(geodir,fname))
regvec = vcat(regvec,rvec)
Expand Down Expand Up @@ -126,15 +126,19 @@ end

"""
tableRectRegions(;
path :: AbstractString = geodir
path :: AbstractString = geodir,
custom :: Bool = true,
giorgi :: Bool = false
) -> nothing
Display all available RectRegions in tabular format.
Keyword Arguments
=================å
- `path` : The path where the list of custom GeoRegions will be retrieved from.
=================
- `path` : The path where the list of custom RectRegions will be retrieved from.
Defaults to the `local` package variable `geodir`
- `custom` : If true, display custom user-defined RectRegions. Default is `true`
- `giorgi` : If true, display GF predefined RectRegions. Default is `false`
"""
function tableRectRegions(;
path :: AbstractString = geodir,
Expand Down Expand Up @@ -205,14 +209,12 @@ end
path :: AbstractString = geodir,
) -> nothing
Display all available RectRegions in tabular format.
Display all available TiltRegions in tabular format.
Keyword Arguments
=================å
- `path` : The path where the list of custom GeoRegions will be retrieved from.
=================
- `path` : The path where the list of custom TiltRegions will be retrieved from.
Defaults to the `local` package variable `geodir`
- `custom` : If true, display custom user-defined GeoRegions. Default is `true`
- `giorgi` : If true, display Giorgi predefined GeoRegions. Default is `false`
"""
function tableTiltRegions(;
path :: AbstractString = geodir,
Expand Down Expand Up @@ -275,11 +277,11 @@ Display all available PolyRegions in tabular format.
Keyword Arguments
=================
- `path` : The path where the list of custom GeoRegions will be retrieved from.
- `path` : The path where the list of custom PolyRegions will be retrieved from.
Defaults to the `local` package variable `geodir`
- `custom` : If true, display custom user-defined GeoRegions. Default is `true`
- `srex` : If true, display SREX predefined GeoRegions. Default is `false`
- `ar6` : If true, display IPCC AR6 predefined GeoRegions. Default is `false`
- `custom` : If true, display custom user-defined PolyRegions. Default is `true`
- `srex` : If true, display SREX predefined PolyRegions. Default is `false`
- `ar6` : If true, display IPCC AR6 predefined PolyRegions. Default is `false`
"""
function tablePolyRegions(;
path :: AbstractString = geodir,
Expand Down

0 comments on commit 8eb6a74

Please sign in to comment.