diff --git a/docs/assets/quickstart.png b/docs/assets/quickstart.png new file mode 100644 index 0000000..3e646af Binary files /dev/null and b/docs/assets/quickstart.png differ diff --git a/docs/index.md b/docs/index.md index 55ceb9a..646dd87 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,58 +1,161 @@ # DisSCube -DisSCube is the spatial data cube engine of the **DisSModel** ecosystem. It converts raw geospatial sources into derived variables aligned to LUCC (Land Use and Cover Change) modeling grids. +**Model-ready grids from heterogeneous raster and vector sources, declared in one TOML file.** -## Core concept +You say which grid you want, which sources feed it and which variables to derive. DisSCube checks the file, fetches +the data, aligns everything to the grid and gives back the variables, with the provenance of every number. It is the +data-preparation step of the **DisSModel** ecosystem, and the counterpart of TerraME's `fill`. -``` -SpatialSource → Derivation → Variable → DerivedVariable (Zarr) +```bash +pip install disscube +disscube validate pipeline.toml # check the file; nothing is downloaded +disscube run pipeline.toml -o cube.tif ``` -A **source** (`SpatialSource`) goes through a **derivation** that applies an **operator** on a **grid** (`GridSpec`), producing a variable registered in the SQLite catalog and stored in Zarr. +--- -## Quick install +## One file describes the whole preparation -```bash -pip install disscube # from PyPI -pip install "disscube[dissmodel]" # + hand-off of the cube to DisSModel models +```toml +schema = 1 +name = "Quickstart" + +[grid] # where: a 300 m grid +name = "demo/300m" +crs = "EPSG:31983" +bbox = [570000.0, 9708000.0, 582000.0, 9720000.0] +resolution = 300 + +[[source]] # from what: files, MapBiomas, BDC, OSM… +id = "landuse" +type = "file" +path = "../data/quickstart/landuse.tif" +crs = "EPSG:31983" + +[[source]] +id = "elevation" +type = "file" +path = "../data/quickstart/elevation.tif" +crs = "EPSG:31983" + +[[derive]] # which variables: one block each +target = "forest_pct" +source = "landuse" +operator = "percentage" +class_code = 3 + +[[derive]] +target = "landuse_major" +source = "landuse" +operator = "majority" + +[[derive]] +target = "elev_mean" +source = "elevation" +operator = "mean" ``` -From a clone, for development: +The file is the experiment: it can be versioned, reviewed and re-run, and a change in any line changes the +fingerprint (`spec_hash`) of the variables it affects. This is `examples/pipelines/quickstart.toml`, which runs offline on the +synthetic data of the repository. + +**Several years?** One block with `years = [2000, 2020]` and an `id = "lulc_{year}"` makes one source per year, and the +derivations that use `{year}` make one variable per year. See [Pipeline files (TOML)](guides/pipeline_files.md). + +--- + +## The commands + +| Command | What it does | +|---|---| +| `disscube validate FILE` | checks the file and prints the plan, before any download | +| `disscube fetch FILE` | downloads the remote sources and checks their SHA-256 | +| `disscube run FILE` | fetches, aligns and derives; with `-o OUT` also exports a GeoTIFF or netCDF | +| `disscube export FILE -o OUT` | exports variables from a workspace that already has them | +| `disscube plot OUT.tif` | a quick look at the bands, as a PNG | ```bash -git clone https://github.com/DisSModel/disscube.git -cd disscube -python -m venv .venv && source .venv/bin/activate -pip install -e ".[dev]" +disscube validate examples/pipelines/quickstart.toml +disscube run examples/pipelines/quickstart.toml --workspace outputs/quickstart -o outputs/quickstart.tif +disscube plot outputs/quickstart.tif --cols 3 ``` -## Main workflow +![The three variables of the quickstart pipeline, drawn by disscube plot: share of forest, dominant class and mean elevation per 300 m cell](assets/quickstart.png) + +Every option is in the [command-line reference](guides/cli.md). Errors exit with status 2 and `--json` gives the +report in a machine-readable form, so a pipeline runs in a script or in CI as it does on a laptop. + +--- + +## What you get + +- **The variables**, one band per variable and year in the exported GeoTIFF (or netCDF), aligned to your grid. +- **A workspace** with the catalog, the stored variables and `run.json`: the sources with their checksums, the + fingerprint of each derivation, the times, and the file that produced it. Rerunning only redoes what changed. +- **Large sources without large memory.** National rasters are read in blocks, so the peak memory depends on the + block and not on the source: MapBiomas for all of Brazil at 5 km ran in under two hours with 3.9 GB + ([block-wise reading](guides/blocks.md)). + +--- + +## Sources in, one value per cell out + +**Sources** (`type`): `file` (a raster, a vector layer or a shapefile in a zip), `mapbiomas` and `prodes` (national +land-cover maps), `bdc` (Brazil Data Cube, over STAC), `classified` (a classified map with its legend), `osm` +(OpenStreetMap), `dem` (elevation and slope) and `union` (several vector sources as one). + +**Operators** summarise a source in each cell: + +- statistics of a raster: `mean`, `median`, `min`, `max`, `std`, `sum` +- classes: `percentage`, `majority`, `minority` (with `groups`, to read leaf classes at level 1) +- vector layers: `distance`, `min_distance`, `count`, `presence`, `area`, `attribute` +- road networks: `network_cost` (also `gpm_network`) + +The sources are in the [pipeline files guide](guides/pipeline_files.md#source-types), and the operators in +[Operator System](architecture/operators.md). From TerraME's `fill`, each operation has a counterpart, measured in +[TerraME Fill Cells Correspondence](terrame_fill_correspondence.md). + +--- + +## Hand the cube to a model + +The workspace opens as a cube in Python, and `disscube[dissmodel]` hands it to a DisSModel model: ```python -from disscube.client import CubeClient -from disscube.models import Derivation - -cube = CubeClient(catalog="catalog.db", store="./data/") - -d = Derivation( - target="forest_pct", - source_id="mapbiomas_2020", - operator="percentage", - class_code=3, - valid_from="2020", - valid_until="2020", -) -cube.derive_declarative(d, grid_id="AC/5km") - -da = cube.load("forest_pct", grid_id="AC/5km") +from disscube import CubeClient + +cube = CubeClient(catalog="outputs/quickstart/catalog.db", store="outputs/quickstart/store/") +ds = cube.to_dataset(["forest_pct", "elev_mean"], grid_id="demo/300m") # xarray.Dataset +backend = cube.to_raster_backend(["forest_pct", "landuse_major"], grid_id="demo/300m") # a DisSModel RasterBackend ``` -## Navigation +```bash +pip install "disscube[dissmodel]" # + the hand-off to DisSModel +pip install "disscube[plot]" # + disscube plot +``` + +The same operations are available as a Python API (`CubeClient`, `Derivation`) for what does not fit in a file: see +[Examples](examples.md). + +--- + +## Where to go next + +- **[Examples](examples.md)**: the quickstart pipeline and the Python API on synthetic data, then real study areas +- **[Pipeline files (TOML)](guides/pipeline_files.md)**: the format, the source types, the operator options +- **[Command line](guides/cli.md)** and **[Block-wise reading](guides/blocks.md)** +- **Sources**: [MapBiomas](guides/mapbiomas.md), [PRODES and SITS](guides/landcover.md), [Brazil Data Cube](guides/bdc.md), [OpenStreetMap](guides/osm.md), [elevation and slope](guides/dem.md) +- **[Architecture](architecture/overview.md)**: the model, the stages and the reproducibility hash + +--- + +## The DisSModel ecosystem + +| Package | Role | Documentation | +|:---|:---|:---| +| [**dissmodel**](https://github.com/DisSModel/dissmodel) | Core framework: clock, spatial substrates, executor, I/O, visualization | [dissmodel.github.io/dissmodel](https://dissmodel.github.io/dissmodel/) | +| [**disscube**](https://github.com/DisSModel/disscube) | Declarative pipelines that turn raster and vector sources into model-ready grids | [dissmodel.github.io/disscube](https://dissmodel.github.io/disscube/) | +| [**disslucc**](https://github.com/DisSModel/disslucc) | Land use and cover change: demand, potential and allocation | [dissmodel.github.io/disslucc](https://dissmodel.github.io/disslucc/) | +| [dissmodel-ca](https://github.com/DisSModel/dissmodel-ca), [dissmodel-sysdyn](https://github.com/DisSModel/dissmodel-sysdyn), [dissmodel-abm](https://github.com/DisSModel/dissmodel-abm) | Ready-to-use cellular automata, system dynamics and agent-based models | GitHub | -- [**Examples**](examples.md) — runnable scripts: the API on synthetic data, and TerraME's *Fill* examples reproduced on real data -- [**Architecture**](architecture/overview.md) — conceptual model, pipeline and reproducibility hash -- [**Operators**](architecture/operators.md) — plugin system, available operators, how to add new ones -- [**Pipeline**](architecture/pipeline.md) — detailed stages: Normalizer → GridAligner → Aggregator → Writer -- [**Catalog**](architecture/catalog.md) — SQLite, schema, hash and time series -- [**Grids**](guides/grids.md) — snapping to the national mesh, local grids, spatial relations -- [**BDC guide**](guides/bdc.md) — integration with Brazil Data Cube and tile-based processing +Developed by the [LambdaGeo](https://github.com/LambdaGeo) group at the Federal University of Maranhão (UFMA). MIT licence. diff --git a/docs/javascripts/mathjax-config.js b/docs/javascripts/mathjax-config.js new file mode 100644 index 0000000..1e76ce2 --- /dev/null +++ b/docs/javascripts/mathjax-config.js @@ -0,0 +1,9 @@ +// Accept $...$ for inline math (as well as \(...\)) in notebook markdown cells. +window.MathJax = { + tex: { + inlineMath: [["$", "$"], ["\\(", "\\)"]], + displayMath: [["$$", "$$"], ["\\[", "\\]"]], + processEscapes: true + }, + options: { skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"] } +}; diff --git a/docs/javascripts/mermaid-init.js b/docs/javascripts/mermaid-init.js new file mode 100644 index 0000000..33759a9 --- /dev/null +++ b/docs/javascripts/mermaid-init.js @@ -0,0 +1,3 @@ +document.addEventListener("DOMContentLoaded", function() { + mermaid.initialize({ startOnLoad: true }); +}); \ No newline at end of file diff --git a/docs/stylesheets/lambdageo.css b/docs/stylesheets/lambdageo.css new file mode 100644 index 0000000..952e52a --- /dev/null +++ b/docs/stylesheets/lambdageo.css @@ -0,0 +1,481 @@ +/* + * LambdaGeo — identidade visual para livros MkDocs Material + * Paleta oficial, tipografia Inter, componentes modernizados. + * Toda a personalização do tema vive neste arquivo; nenhum arquivo + * interno do tema é sobrescrito. + */ + +/* Fonte Inter — pesos 400/500/600/700 (regular + itálico no peso base) */ +@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap"); + +/* ---------------------------------------------------------------- * + * 1. Variáveis de marca + * ---------------------------------------------------------------- */ +:root { + --lg-primary: #1565c0; /* Azul */ + --lg-secondary: #2e7d32; /* Verde */ + --lg-accent: #00acc1; /* Ciano */ + --lg-dark: #263238; /* Grafite */ + --lg-light: #fafafa; /* Branco */ + + /* Tons derivados, usados em hover/estados e no modo escuro */ + --lg-primary-light: #5e92f3; + --lg-primary-dark: #003c8f; + --lg-secondary-light: #60ad5e; + --lg-secondary-dark: #005005; + --lg-accent-light: #5ddef4; + --lg-accent-dark: #007c91; + --lg-dark-light: #4f5b62; + --lg-dark-dark: #000a12; + + /* Escala tipográfica (pesos Inter: 400/500/600/700) */ + --lg-font-body: 400; + --lg-font-medium: 500; + --lg-font-semibold: 600; + --lg-font-bold: 700; + + /* Ritmo vertical / largura de leitura */ + --lg-reading-width: 46rem; + --lg-radius: 10px; + --lg-radius-sm: 6px; +} + +/* ---------------------------------------------------------------- * + * 2. Tipografia — Inter em toda a documentação + * ---------------------------------------------------------------- */ +:root, +[data-md-color-scheme] { + --md-text-font: "Inter", "-apple-system", "Helvetica Neue", Arial, sans-serif; + /* Fonte monoespaçada do sistema: evita uma segunda requisição de fonte externa */ + --md-code-font: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", + "Liberation Mono", monospace; +} + +.md-typeset { + font-weight: var(--lg-font-body); + line-height: 1.7; +} + +.md-typeset h1, +.md-typeset h2, +.md-typeset h3, +.md-typeset h4, +.md-typeset h5, +.md-typeset h6 { + font-family: var(--md-text-font); + letter-spacing: -0.01em; + color: var(--lg-dark); +} + +[data-md-color-scheme="slate"] .md-typeset h1, +[data-md-color-scheme="slate"] .md-typeset h2, +[data-md-color-scheme="slate"] .md-typeset h3, +[data-md-color-scheme="slate"] .md-typeset h4, +[data-md-color-scheme="slate"] .md-typeset h5, +[data-md-color-scheme="slate"] .md-typeset h6 { + color: var(--lg-light); +} + +.md-typeset h1 { + font-weight: var(--lg-font-bold); + font-size: 2.1rem; + margin-bottom: 1.4rem; +} + +.md-typeset h2 { + font-weight: var(--lg-font-semibold); + font-size: 1.55rem; + margin-top: 2.4rem; + padding-bottom: 0.4rem; + border-bottom: 1px solid var(--md-default-fg-color--lightest); +} + +.md-typeset h3 { + font-weight: var(--lg-font-semibold); + font-size: 1.2rem; + margin-top: 1.9rem; +} + +.md-typeset h4 { + font-weight: var(--lg-font-medium); + font-size: 1.05rem; +} + +.md-typeset p, +.md-typeset ul, +.md-typeset ol { + margin-bottom: 1.1rem; +} + +/* Navegação lateral, breadcrumbs e TOC usam peso médio para hierarquia clara */ +.md-nav { + font-weight: var(--lg-font-medium); + font-size: 0.7rem; +} + +.md-nav__title { + font-weight: var(--lg-font-semibold); +} + +.md-nav__item .md-nav__link--active, +.md-nav__link:focus, +.md-nav__link:hover { + color: var(--lg-primary); +} + +[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active { + color: var(--lg-accent-light); +} + +/* ---------------------------------------------------------------- * + * 3. Paleta — modo claro + * ---------------------------------------------------------------- */ +[data-md-color-scheme="default"] { + --md-primary-fg-color: var(--lg-primary); + --md-primary-fg-color--light: var(--lg-primary-light); + --md-primary-fg-color--dark: var(--lg-primary-dark); + --md-primary-bg-color: var(--lg-light); + --md-primary-bg-color--light: var(--lg-light); + + --md-accent-fg-color: var(--lg-accent); + --md-accent-fg-color--transparent: rgba(0, 172, 193, 0.1); + --md-accent-bg-color: var(--lg-light); + + --md-default-bg-color: var(--lg-light); + --md-default-fg-color: var(--lg-dark); + --md-default-fg-color--light: #445056; + --md-default-fg-color--lighter: #78878e; + --md-default-fg-color--lightest: #e3e8ea; + + --md-typeset-color: var(--lg-dark); + --md-typeset-a-color: var(--lg-primary); + + --md-footer-bg-color: var(--lg-dark); + --md-footer-bg-color--dark: var(--lg-dark-dark); + --md-footer-fg-color: var(--lg-light); + --md-footer-fg-color--light: rgba(250, 250, 250, 0.7); +} + +/* ---------------------------------------------------------------- * + * 4. Paleta — modo escuro (alto contraste sobre grafite) + * ---------------------------------------------------------------- */ +[data-md-color-scheme="slate"] { + --md-primary-fg-color: var(--lg-dark); + --md-primary-fg-color--light: var(--lg-dark-light); + --md-primary-fg-color--dark: var(--lg-dark-dark); + --md-primary-bg-color: var(--lg-light); + + --md-accent-fg-color: var(--lg-accent-light); + --md-accent-fg-color--transparent: rgba(93, 222, 244, 0.15); + + --md-default-bg-color: #1b2529; + --md-default-fg-color: #eceff1; + --md-default-fg-color--light: #cfd8dc; + --md-default-fg-color--lighter: #90a4ae; + --md-default-fg-color--lightest: #37474f; + + --md-typeset-color: #eceff1; + --md-typeset-a-color: #7aa9ff; + + --md-code-bg-color: #0f1719; + --md-code-fg-color: #eceff1; + + --md-footer-bg-color: #14181a; + --md-footer-bg-color--dark: #0c0e0f; +} + +/* ---------------------------------------------------------------- * + * 5. Cabeçalho — sem logotipo, apenas título/subtítulo + * ---------------------------------------------------------------- */ +.md-header__title { + font-weight: var(--lg-font-semibold); +} + +.md-header__button.md-logo { + display: none; +} + +/* ---------------------------------------------------------------- * + * 6. Largura de leitura e espaçamento + * ---------------------------------------------------------------- */ +.md-grid { + max-width: 76rem; +} + +.md-typeset { + max-width: var(--lg-reading-width); + margin-left: auto; + margin-right: auto; +} + +/* Tabelas, blocos de código e admonitions podem usar a largura toda do artigo */ +.md-typeset table:not([class]), +.md-typeset pre, +.md-typeset .admonition, +.md-typeset .tabbed-set, +.md-typeset .grid { + max-width: 100%; +} + +@media screen and (max-width: 76.1875em) { + .md-typeset { + max-width: none; + } +} + +/* ---------------------------------------------------------------- * + * 7. Admonitions — cores consistentes com a marca + * ---------------------------------------------------------------- */ +.md-typeset .admonition, +.md-typeset details { + border-radius: var(--lg-radius-sm); + border-width: 1px; +} + +/* Note → azul da marca */ +.md-typeset .admonition.note, +.md-typeset details.note { + border-color: var(--lg-primary); +} +.md-typeset .note > .admonition-title, +.md-typeset .note > summary { + background-color: rgba(21, 101, 192, 0.08); +} +.md-typeset .note > .admonition-title::before, +.md-typeset .note > summary::before { + background-color: var(--lg-primary); +} + +/* Tip / Success → verde da marca */ +.md-typeset .admonition.tip, +.md-typeset details.tip, +.md-typeset .admonition.success, +.md-typeset details.success { + border-color: var(--lg-secondary); +} +.md-typeset .tip > .admonition-title, +.md-typeset .tip > summary, +.md-typeset .success > .admonition-title, +.md-typeset .success > summary { + background-color: rgba(46, 125, 50, 0.08); +} +.md-typeset .tip > .admonition-title::before, +.md-typeset .tip > summary::before, +.md-typeset .success > .admonition-title::before, +.md-typeset .success > summary::before { + background-color: var(--lg-secondary); +} + +/* Question / Info → ciano da marca (complementa nota/dica) */ +.md-typeset .admonition.question, +.md-typeset details.question, +.md-typeset .admonition.info, +.md-typeset details.info { + border-color: var(--lg-accent); +} +.md-typeset .question > .admonition-title, +.md-typeset .question > summary, +.md-typeset .info > .admonition-title, +.md-typeset .info > summary { + background-color: rgba(0, 172, 193, 0.08); +} +.md-typeset .question > .admonition-title::before, +.md-typeset .question > summary::before, +.md-typeset .info > .admonition-title::before, +.md-typeset .info > summary::before { + background-color: var(--lg-accent); +} + +/* Warning e Danger permanecem no padrão do Material (laranja / vermelho) */ + +/* ---------------------------------------------------------------- * + * 8. Blocos de código + * ---------------------------------------------------------------- */ +.md-typeset pre > code, +.md-typeset .highlight { + border-radius: var(--lg-radius); +} + +.md-typeset pre { + border-radius: var(--lg-radius); + padding: 0.2rem 0.2rem; +} + +.md-typeset code { + border-radius: 4px; + font-weight: var(--lg-font-medium); +} + +.md-typeset .highlighttable, +.md-typeset .highlight pre { + border-radius: var(--lg-radius); +} + +.md-clipboard { + border-radius: 4px; +} + +.md-clipboard:hover { + color: var(--lg-accent); +} + +/* ---------------------------------------------------------------- * + * 9. Tabelas + * ---------------------------------------------------------------- */ +.md-typeset table:not([class]) { + border-radius: var(--lg-radius-sm); + overflow: hidden; + border: 1px solid var(--md-default-fg-color--lightest); +} + +.md-typeset table:not([class]) th { + background-color: var(--lg-primary); + color: var(--lg-light); + font-weight: var(--lg-font-semibold); +} + +.md-typeset table:not([class]) tr:nth-child(even) { + background-color: rgba(21, 101, 192, 0.035); +} + +[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(even) { + background-color: rgba(255, 255, 255, 0.03); +} + +/* ---------------------------------------------------------------- * + * 10. Links, botões, abas + * ---------------------------------------------------------------- */ +.md-typeset a { + font-weight: var(--lg-font-medium); + text-decoration-thickness: 1px; + text-underline-offset: 2px; +} + +.md-typeset a:hover { + color: var(--lg-accent); +} + +.md-typeset .md-button { + border-radius: var(--lg-radius-sm); + font-weight: var(--lg-font-semibold); + border-color: var(--lg-primary); + color: var(--lg-primary); +} + +.md-typeset .md-button:hover, +.md-typeset .md-button--primary:hover { + background-color: var(--lg-primary); + border-color: var(--lg-primary); + color: var(--lg-light); +} + +.md-typeset .md-button--primary { + background-color: var(--lg-primary); + border-color: var(--lg-primary); + color: var(--lg-light); +} + +.md-typeset .tabbed-set > .tabbed-labels > label { + font-weight: var(--lg-font-medium); + border-radius: var(--lg-radius-sm) var(--lg-radius-sm) 0 0; +} + +.md-typeset .tabbed-set > input:checked + label { + color: var(--lg-primary); + border-color: var(--lg-primary); +} + +/* ---------------------------------------------------------------- * + * 11. Cards e grids (pymdownx / Material "grid cards") + * ---------------------------------------------------------------- */ +.md-typeset .grid.cards > ul > li, +.md-typeset .grid > .card { + border-radius: var(--lg-radius); + border: 1px solid var(--md-default-fg-color--lightest); + transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; +} + +.md-typeset .grid.cards > ul > li:hover { + border-color: var(--lg-accent); + box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); + transform: translateY(-2px); +} + +/* ---------------------------------------------------------------- * + * 12. Badges (utilitário — para uso opcional em HTML embutido) * + * ---------------------------------------------------------------- */ +.lg-badge { + display: inline-block; + padding: 0.1rem 0.55rem; + border-radius: 999px; + font-size: 0.7rem; + font-weight: var(--lg-font-semibold); + line-height: 1.6; + color: var(--lg-light); + background-color: var(--lg-dark-light); +} + +.lg-badge--primary { background-color: var(--lg-primary); } +.lg-badge--secondary { background-color: var(--lg-secondary); } +.lg-badge--accent { background-color: var(--lg-accent); } + +/* ---------------------------------------------------------------- * + * 13. Rodapé + * ---------------------------------------------------------------- */ +.md-footer-meta { + background-color: var(--lg-dark-dark); +} + +.md-footer__link:hover .md-footer__title, +.md-footer__link:hover .md-footer__direction { + color: var(--lg-accent-light); +} + +/* ---------------------------------------------------------------- * + * 14. Busca + * ---------------------------------------------------------------- */ +.md-search-result__meta { + color: var(--md-default-fg-color--light); +} + +mark { + background-color: rgba(0, 172, 193, 0.35); + color: inherit; +} + +/* ---------------------------------------------------------------- * + * 15. Acessibilidade — foco visível + * ---------------------------------------------------------------- */ +a:focus-visible, +button:focus-visible, +.md-nav__link:focus-visible, +.md-tabs__link:focus-visible, +input:focus-visible { + outline: 2px solid var(--lg-accent); + outline-offset: 2px; + border-radius: 2px; +} + +/* ---------------------------------------------------------------- * + * 16. Responsividade fina + * ---------------------------------------------------------------- */ +@media screen and (max-width: 44.9375em) { + .md-typeset h1 { font-size: 1.7rem; } + .md-typeset h2 { font-size: 1.3rem; } + .md-typeset pre { padding: 0.1rem; } + + /* Material's default mobile gutter (0.8rem) is too tight for long-form + reading; give the text more breathing room on phone-sized screens. */ + .md-content__inner { + margin-left: 1.25rem; + margin-right: 1.25rem; + } +} + +/* Wide display equations scroll sideways instead of being clipped on phones. */ +.md-typeset mjx-container[display="true"], +.md-typeset .arithmatex { + overflow-x: auto; + overflow-y: hidden; + max-width: 100%; +} diff --git a/mkdocs.yml b/mkdocs.yml index 0c812df..21d66d1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,43 +1,82 @@ -site_name: DisSCube Documentation -site_description: Spatial data cube engine of the DisSModel ecosystem +site_name: DisSCube +site_description: "Spatial data cube engine of the DisSModel ecosystem: declarative pipelines that turn raster and vector sources into model-ready grids." +site_author: "LambdaGeo / UFMA" site_url: https://dissmodel.github.io/disscube/ repo_url: https://github.com/DisSModel/disscube repo_name: DisSModel/disscube edit_uri: edit/main/docs/ + theme: name: material - palette: - scheme: slate - primary: indigo - accent: indigo + language: en + font: false features: - navigation.tabs + - navigation.instant + - navigation.tracking + - navigation.sections + - navigation.top + - search.highlight + - search.share + - content.code.annotate - content.code.copy + - content.tabs.link + - content.tooltips - content.action.edit + - toc.follow + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: custom + accent: custom + toggle: + icon: material/weather-sunny + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: custom + accent: custom + toggle: + icon: material/weather-night + name: Switch to light mode + +plugins: + - search markdown_extensions: + - attr_list + - admonition + - pymdownx.details + - pymdownx.arithmatex: + generic: true - pymdownx.highlight: anchor_linenums: true - pymdownx.inlinehilite - pymdownx.snippets + - pymdownx.tabbed: + alternate_style: true - pymdownx.superfences: custom_fences: - name: mermaid class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - - admonition - - pymdownx.details + - tables + - toc: + permalink: true + +extra_css: + - stylesheets/lambdageo.css + +extra_javascript: + - javascripts/mathjax-config.js + - https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js + - https://unpkg.com/mermaid@10/dist/mermaid.min.js + - javascripts/mermaid-init.js nav: - Home: index.md - - Examples: examples.md - - Architecture: - - Overview: architecture/overview.md - - Operator System: architecture/operators.md - - Catalog & Persistence: architecture/catalog.md - - Pipeline Stages: architecture/pipeline.md - - Master Grids & Tiling: architecture/tiling.md - - TerraME Fill Cells Correspondence: terrame_fill_correspondence.md + - Getting started: + - Examples: examples.md - Guides: - Pipeline files (TOML): guides/pipeline_files.md - Command line: guides/cli.md @@ -48,3 +87,11 @@ nav: - "OpenStreetMap": guides/osm.md - "Elevation and slope (DEM)": guides/dem.md - Custom Grids: guides/grids.md + - Architecture: + - Overview: architecture/overview.md + - Operator System: architecture/operators.md + - Catalog & Persistence: architecture/catalog.md + - Pipeline Stages: architecture/pipeline.md + - Master Grids & Tiling: architecture/tiling.md + - Validation: + - "TerraME Fill Cells correspondence": terrame_fill_correspondence.md