Skip to content

Commit

Permalink
Updating links, do all links work now?
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Feb 14, 2025
1 parent 05718e8 commit 90405a8
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 18 deletions.
28 changes: 21 additions & 7 deletions docs/src/api/isinonequal.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# API for Is it in/on a GeoRegion?
# API for Is it in/on/equal to a GeoRegion?

## In

### Is Point In a GeoRegion
```@docs
in(
Point :: Point2{<:Real},
geo :: GeoRegion;
throw :: Bool = false
)
```

### Is GeoRegion In a GeoRegion
```@docs
in(
cgeo :: GeoRegion,
geo :: GeoRegion;
Expand All @@ -18,12 +24,17 @@ in(

## On

### Is Point On a GeoRegion
```@docs
on(
point :: Point2{<:Real},
geo :: GeoRegion;
throw :: Bool = false
)
```

### Is GeoRegion On a GeoRegion
```@docs
on(
geo1 :: GeoRegion,
geo2 :: GeoRegion;
Expand All @@ -34,7 +45,6 @@ on(
```

## Equivalence of GeoRegions

```@docs
==(
geo1 :: GeoRegion,
Expand All @@ -43,21 +53,21 @@ on(
isequal(
geo1 :: GeoRegion,
geo2 :: GeoRegion;
strict :: Bool = true,
verbose :: Bool = false
)
```

## Does this GeoRegion already Exist?
```@docs
isgeo(
geo :: GeoRegion;
path :: AbstractString = dirname(geo.path),
strict :: Bool = true,
shape :: Bool = true,
throw :: Bool = true,
verbose :: Bool = false
)
```

## Equivalence of GeoRegion Properties

## Equivalence of GeoRegion Shapes
```@docs
isgeoshape(
geo :: GeoRegion;
Expand All @@ -72,6 +82,10 @@ isgeoshape(
returnID :: Bool = true,
verbose :: Bool = false
)
```

## Equivalence of GeoRegion IDs
```@docs
isID(
ID :: AbstractString;
path :: AbstractString = homedir(),
Expand Down
2 changes: 1 addition & 1 deletion docs/src/basics/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ lat = collect(10sin.((0:0.01:1).*2pi))
GeoRegion(lon,lat)
```

See the API [here](/api/create#GeoRegions.TiltRegion-Tuple{AbstractString,%20AbstractString,%20AbstractString,%20Vararg{Real,%205}})
See the API [here](/api/createaddreadrm#Creating-GeoRegions)
4 changes: 2 additions & 2 deletions docs/src/basics/read.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reading Predefined `GeoRegion`s

The most basic functionality is to retrieve the information of a `GeoRegion`. There are several sets of predefined GeoRegions in GeoRegions.jl, listed [here](predefined).
The most basic functionality is to retrieve the information of a `GeoRegion`. There are several sets of predefined GeoRegions in GeoRegions.jl, listed [here](/basics/predefined/listall).

You can read and retrieve the properties of a `GeoRegion` using the function `GeoRegion()` for a given `ID`, which is a `String` type.

Expand All @@ -17,4 +17,4 @@ geo = GeoRegion("GLB")

This is the most basic, and yet the most important, functionality of GeoRegions.jl. For the full API of the function `GeoRegion()` that talks about more advanced uses, see the section on [reading custom GeoRegions](/tutorials/overview)

See the API [here](api/addreadrm#GeoRegions.GeoRegion-Tuple{AbstractString})
See the API [here](/api/createaddreadrm#Retrieving-GeoRegions)
4 changes: 2 additions & 2 deletions docs/src/basics/tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tableGeoRegions(predefined = true/false, custom = true/false)
```

!!! 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(homedir(),".georegions")`. For more on user-defined GeoRegions and saving them as part of a larger project, refer to how to [setup](/tutorials/projects) GeoRegions.jl for a project. Full API documentation for `tableGeoRegions()` is given [here](/api/tables).
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(homedir(),".georegions")`. For more on user-defined GeoRegions and saving them as part of a larger project, refer to how to [setup](/tutorials/projects) GeoRegions.jl for a project.

## Use Case Examples

Expand All @@ -16,7 +16,7 @@ using GeoRegions
tableGeoRegions(warn=false,crop=true)
```

See the API [here](/api/addreadrm#GeoRegions.GeoRegion-Tuple{AbstractString})
See the API [here](/api/tables)

## More specific Tabular Lists of GeoRegions

Expand Down
25 changes: 20 additions & 5 deletions docs/src/tutorials/projects/addreadrm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ geo = GeoRegion(
add(geo,path=joinpath(pwd(),"test"))
```

See the API [here](/api/addreadrm#GeoRegions.add)
See the API [here](/api/createaddreadrm#GeoRegions.add)

Or we can just directly add the GeoRegion simultaneously when it is defined, as follows:

Expand All @@ -46,7 +46,7 @@ GeoRegion(
)
```

See the API [here](/api/create)
See the API [here](/api/createaddreadrm#Creating-GeoRegions)

## 2. Check if GeoRegions have been added

Expand All @@ -64,7 +64,7 @@ Alternatively, we can check if the `ID`s have been added using the function `isI
isID("TST",path=joinpath(pwd(),"test"))
```

See the API [here](/api/addreadrm#GeoRegions.isID)
See the API [here](/api/isinonequal#GeoRegions.isID-Tuple{AbstractString})

## 3. Reading and Retrieving GeoRegions for your Project

Expand All @@ -82,6 +82,21 @@ lon,lat = coordinates(geo)

See the API [here](/api/addreadrm#GeoRegions.GeoRegion-Tuple{AbstractString})

### 3.1 Loading all custom GeoRegions for your Project

If you have multiple GeoRegions saved in your project and you want to load all of them as a vector, you can use the `loadGeoRegions()` function

```@example addreadremove
geovec = loadGeoRegions(path=joinpath(pwd(),"test"))
```

Which returns a `Vector` of `GeoRegion` types.

!!! tip "`GLB` is automatically included"
The `GLB` GeoRegion will automatically be included in this vector, so your vector will always have at least 1 element inside it.

See the API [here]()

## 4. Overwriting Information for a Previously Defined GeoRegion

Once a GeoRegion associated with an `ID` has been saved into the directory named `path`, this `ID` can no longer be used in association with another GeoRegion for this Project. Therefore, you cannot save another GeoRegion of this `ID` into the same project.
Expand Down Expand Up @@ -128,7 +143,7 @@ isID("TST",path=joinpath(pwd(),"test"))

And we see that it does not.

See the API [here](/api/addreadrm#Base.Filesystem.rm)
See the API [here](/api/createaddreadrm#Base.Filesystem.rm)

### 5.2 Removing a GeoRegion based on its `ID`

Expand All @@ -145,7 +160,7 @@ isID("TST2",path=joinpath(pwd(),"test"))
!!! tip "Predefined `GeoRegion`s cannot be removed"
You cannot remove `GLB`, `GF_*`, `SRX_*` or `AR6_*` that have been predefined in GeoRegions.jl

See the API [here](/api/addreadrm#GeoRegions.rmID)
See the API [here](/api/createaddreadrm#GeoRegions.rmID)

## 6. Removing a the custom GeoRegions lists from your Project

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/projects/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tableGeoRegions(path=pwd(),predefined=false)

Note, we have no custom GeoRegions added, so there is nothing to list right now even though the files exist. If no GeoRegions are available, a warning will be shown unless the keyword `warn = false` is set.

See the API [here](/api/project#GeoRegions.tableGeoRegions)
See the API [here](/api/tables)

## 3. Removing a the custom GeoRegions list from your Project

Expand Down

0 comments on commit 90405a8

Please sign in to comment.