Skip to content

Commit

Permalink
Rearranging the documentation again
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 7, 2024
1 parent c4a3bc5 commit 437b0bb
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 12 deletions.
22 changes: 11 additions & 11 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ makedocs(;
"Home" => "index.md",
"What is a GeoRegion?" => "georegions.md",
"Basic Functionality" => [
"Retrieving GeoRegions" => "basics/read.md",
"Predefined GeoRegions" => "basics/predefined.md",
"GeoRegion Properties" => "basics/shape.md",
"Retrieving GeoRegions" => "basics/read.md",
"Predefined GeoRegions" => "basics/predefined.md",
"GeoRegion Properties" => "basics/shape.md",
"Table of GeoRegions" => "basics/tables.md",
"Listing All GeoRegions" => "basics/listall.md",
],
"Customizing GeoRegions.jl" => [
"Setup GeoRegions.jl" => "custom/setup.md",
"Create, Save, Retrieve" => "custom/overview.md",
"Defining RectRegions" => "custom/rectregion.md",
"Defining PolyRegions" => "custom/polyregion.md",
# "Defining TiltRegions" => "custom/tiltregion.md",
"Project Setup" => "custom/setup.md",
"More on Creation" => [
"Creating RectRegions" => "custom/create/rectregion.md",
"Creating PolyRegions" => "custom/create/polyregion.md",
# "Creating TiltRegions" => "custom/create/tiltregion.md",
],
"Custom GeoRegion Files" => "custom/files.md",
],
# "Tutorials" => [
# "Is it in a GeoRegion?" => "using/isin.md",
# "Custom GeoRegions" => "using/custom.md",
# ],
"Tables of GeoRegions" => [
"Lists of predefined GeoRegions" => "lists/default.md",
# "Customized Lists of GeoRegions" => "lists/api.md",
],
],
)

Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions docs/src/basics/tables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Tabular Listings of GeoRegions

A list of GeoRegions and their basic properties can be called using the function `tableGeoRegions()`, which lists all available GeoRegions, both predefined and [custom/user-defined](/custom/overview). You can also choose to list only predefined or user-customized GeoRegions by setting their respective keywords arguments to `true/false`.

```julia
tableGeoRegions()
```

!!! tip "Additional Functionality for `tableGeoRegions()`"
It is possible to use `tableGeoRegions()` to list user-defined `GeoRegion`s in specific paths/directories. By default, it will list user-defined `GeoRegion`s saved into the path `joinpath(DEPOT_PATH[1],"files","GeoRegions")`. For more on user-defined GeoRegions and saving them as part of a larger project, refer to how to [setup](/custom/setup) GeoRegions.jl for a project. Full API documentation for `tableGeoRegions()` is given [here](/custom/overview).

## More specific lists of GeoRegions

Besides listing all available GeoRegions, it is also possible to list a variety of different subtypes of GeoRegions with the `tableRectRegions()`, `tableTiltRegions()` and `tablePolyRegions()`.

```@docs
tableRectRegions
tableTiltRegions
tablePolyRegions
```
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions docs/src/custom/files.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# Reading in a file with a list of Custom `GeoRegion`


## Listing GeoRegions inside Custom Files

It is possible to list the GeoRegions in specified file. The template for these files can be retrieved using the function `setupGeoRegions()`

```@docs
tableGeoRegions(fname::AbstractString)
```
27 changes: 26 additions & 1 deletion docs/src/custom/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ TiltRegion(ID, pID, name, ...)
PolyRegion(ID, pID, name, ...)
```

Please refer to the respective pages dedicated to each of the `GeoRegion` subtypes:
* [RectRegion](/custom/create/rectregion)
* [PolyRegion](/custom/create/polyregion)
* [TiltRegion](/custom/create/tiltregion)

!!! warning "Constraints on `ID` and `pID` when `save = true`"
When `save = true`, the GeoRegion `pID` must already have been previously defined, and the region defined by the GeoRegion `ID` must be entirely within the region defined by the GeoRegion `pID`.

Expand All @@ -36,7 +41,11 @@ You can also add a `GeoRegion` variable in the workspace that you have not yet s

```julia
geo = PolyRegion(ID, pID, name, ...)
add(geo, path = "<directory>")
add(geo, path = ...)
```

```@docs
add
```

## Calling saved GeoRegions
Expand All @@ -45,4 +54,20 @@ If a GeoRegion has been saved to a `path`, it and its properties can be called u

```julia
geo = GeoRegion(ID, path = "<directory>")
```

```@docs
GeoRegion(ID::AbstractString; path::AbstractString)
```

## Table of user-defined GeoRegions

You can create a table of all the `GeoRegion`s that have been saved to `path` using `tableGeoRegions()` as follows.

```julia
tableGeoRegions(;path = ...)
```

```@docs
tableGeoRegions(; path::AbstractString, predefined::Bool, custom::Bool)
```

0 comments on commit 437b0bb

Please sign in to comment.