# aterui/wrapbox architecture

> Architecture diagram of the GitHub repository aterui/wrapbox, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aterui/wrapbox
- Repository: https://github.com/aterui/wrapbox

## Overview

This R package appears to provide raster-based hydrology and spatial-coordinate utilities. Its documented capabilities include nested and unnested watershed delineation, flow/grid and stream conversions, raster-to-polygon conversion, and coordinate or key helpers. The supplied materials contain no README or source excerpts, so implementation details and call relationships cannot be verified; paths below identify the available R source files, and no edges are asserted.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hydrology["Hydrology tools"]
  node_wsd_nested["Nested watersheds<br/>[wrapbox.R]"]
  node_wsd_unnested["Unnested watersheds<br/>[wrapbox.R]"]
  node_flow2grid["Flow to grid<br/>[wrapbox.R]"]
  node_grid2stream["Grid to stream<br/>[wrapbox.R]"]
  node_arc2d8["Arc to D8<br/>[wrapbox.R]"]
end

subgraph group_spatial["Spatial utilities"]
  node_rast2poly["Raster to polygons<br/>[wrapbox.R]"]
  node_point2utm["Point to UTM<br/>[wrapbox.R]"]
  node_get_utm["UTM lookup<br/>[wrapbox.R]"]
  node_get_tf["Transform lookup<br/>[wrapbox.R]"]
  node_get_key["Key lookup<br/>[wrapbox.R]"]
end

subgraph group_internal["Package internals"]
  node_utilities["Shared utilities<br/>[utils.R]"]
end

click node_wsd_nested "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_wsd_unnested "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_flow2grid "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_grid2stream "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_arc2d8 "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_rast2poly "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_point2utm "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_get_utm "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_get_tf "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_get_key "https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R"
click node_utilities "https://github.com/aterui/wrapbox/blob/master/R/utils.R"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_wsd_nested,node_wsd_unnested,node_flow2grid,node_grid2stream,node_arc2d8 toneBlue
class node_rast2poly,node_point2utm,node_get_utm,node_get_tf,node_get_key toneAmber
class node_utilities toneMint
```

## Components

### Hydrology tools

- [Nested watersheds](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Unnested watersheds](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Flow to grid](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Grid to stream](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Arc to D8](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`

### Spatial utilities

- [Raster to polygons](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Point to UTM](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [UTM lookup](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Transform lookup](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`
- [Key lookup](https://github.com/aterui/wrapbox/blob/master/R/wrapbox.R): `R/wrapbox.R`

### Package internals

- [Shared utilities](https://github.com/aterui/wrapbox/blob/master/R/utils.R): `R/utils.R`
