Glossary: treetracker-tile-server

Generated by .github/scripts/build-glossary.mjs from domain-graph.json (source commit b619c05). Do not edit by hand.

This glossary lists the business terms of treetracker-tile-server. Each term links to its domain, which says what the domain does, its rules, and its flows. The estate glossary shows which other repos use the same terms.

Terms

Domains

Map Tile Serving

The Express service in greenstand/ answers slippy-map tile requests for the Treetracker web map. Each request gets a new 256x256 mapnik.Map that loads the per-tile Mapnik XML style and renders a PNG image or a UTF grid JSON for click and hover details. Every other path returns a version banner.

Terms: Tile (z/x/y), mapnik.Map, mapnik.Image, mapnik.Grid, UTF grid fields (id, latlon, count, type, zoom_to), pg Pool, Config

Rules:

Flows:

Tile Stylesheet Composition

Config.getXMLString in greenstand/config.js turns each tile request into a complete Mapnik XML document. For zoom 1 to 15 it inlines the tree clusters as GeoJSON that it gets through the cached PGPool. For other zoom levels it fills a PostGIS layer template with the DB_URL credentials and the tile SQL, so that Mapnik queries the trees at render time.

Terms: Config, PGPool, Mapnik XML templates (xml, xmlTree, xmlJson, xml2, xmlTree2, xmlTree3, xmlJson2, xmlJson3), GeoJSON FeatureCollection, DB_URL, Layer l1, Icon set (o, ptk-b, ptk-s)

Rules:

Flows:

Tree Query Selection

The Map class in greenstand/Map.js selects one SQL builder from greenstand/sqls for each tile by map mode and zoom band. The builders write PostGIS SQL that returns region clusters, clusters made on the fly with ST_ClusterWithin, precomputed clusters, or single tree points. Each row has the type, id, latlon, count, and zoom_to values that the styles and UTF grids use, and the cluster rows also have a count_text label.

Terms: Map (query planner), SQLCase1 and SQLCase1WithZoomTarget (active_tree_region counts), SQLCase2 and SQLCase2Wallet (tree points), SQLCase3 (ST_ClusterWithin), SQLCase4 (clusters table), Timeline builders (SQLCase1Timeline, SQLCase2Timeline, SQLCase3Timeline), trees, active_tree_region, region, clusters, planter, entity and entity_relationship, wallet.token and wallet.wallet

Rules:

Flows:

Release and Deployment

GitHub Actions workflows, the Dockerfile, and the kustomize manifests in deployment/ release and run the tile server. A push to master or next cuts a semantic-release version, pushes the greenstand/treetracker-map-tile-server image to DockerHub, and applies the development overlay. Manual workflows deploy a chosen git tag to test or production on DigitalOcean Kubernetes, where an Ambassador Mapping exposes the server under /tiles/.

Terms: semantic-release version, Docker image greenstand/treetracker-map-tile-server, Base image greenstand/tile-server-base:first, Kustomize base and overlays (development, test, production, beta), SealedSecret database-connection, Ambassador Mapping, Kubernetes Service and Deployment, DigitalOcean cluster

Rules:

Flows: