← all branches

feat/atlas-scan

safeviewing older commit
1616332 · incrementalpre-PRreviewed 2026-07-18 00:22 UTC0H · 0M · 1L · 2I
The branch
Purpose
Build a private siting-intelligence atlas for the Batu energy exploration suite — a MapLibre GL explorer of Mexico's energy infrastructure (generation, transmission, gas, water) to support siting and origination decisions.
Goal
Incrementally enrich the atlas with data layers: gas pipeline network (CENAGAS + OSM hybrid), aquifer water availability (CONAGUA), CNH gas-duct detail, and OSM industrial parks.
Sub-goals
  • SG-1: Natural-gas pipeline network layer (CENAGAS trunk via CNH/SENER)
  • SG-2: Enrich gas pipelines with OSM geometry (hybrid precision-styled)
  • SG-3: Propagate GEM attributes to adjacent OSM segments; glow precise-only
  • SG-4: Trace the gas network from CENAGAS as authoritative source
  • SG-5: Add CONAGUA aquifer water-availability layer
  • SG-6: Add CNH gas-duct detail + OSM industrial-parks layers (this commit)
The changes (whole branch)
What
Added gas_ductos_cnh.geojson (1,986 CNH duct segments, 614 KB) and parques_industriales.geojson (256 OSM industrial parks, 51 KB). Updated index.html to fetch both eagerly, add map sources/layers with appropriate styling, wire click/hover popup handlers, and extend the GROUPS/TOGS layer-toggle arrays.
Why
CNH ductos densify the CENAGAS trunk with last-mile detail; industrial parks add a proximity-to-grid signal (color-coded by distance to nearest substation) for site selection.
Areas
apps/web/public/atlas/data/gas_ductos_cnh.geojson+10apps/web/public/atlas/data/gas_pipelines.geojson+10apps/web/public/atlas/data/acuiferos.geojson+10apps/web/public/atlas/data/parques_industriales.geojson+10apps/web/public/atlas/index.html+315
Blast
5 files, +35/-5 lines across apps/web/public/atlas only; private static explorer — no backend, no auth, no API, no CDK changes
CI / PR checks· no open PR for this branchCodeRabbit· no .coderabbit.yaml in repotypecheck· static HTML — no TS compilation

Findings · 3

correctness1

info

614 KB new data file fetched eagerly alongside existing large files

apps/web/public/atlas/index.html:250

Both new fetches have .catch fallbacks so the map never hard-errors. Layers start hidden (visibility:'none') so rendering is unaffected, but initial page load gains ~665 KB. Acceptable tradeoff for a private siting tool; note if perf regression is observed.

security1

low

GeoJSON property values injected unescaped into popup setHTML()

apps/web/public/atlas/index.html:314

ductClick and parques click handlers build HTML strings with p.n, p.op, p.edo, p.gkm, p.skv via template literals/concat and pass to maplibregl Popup.setHTML(). Pre-existing pattern in gasClick (line 329). Risk controlled today (committed static files) but becomes XSS if data is later sourced from an external API. Fix: a lightweight escapeHtml() helper on all property slots.

conventions1

info

ductos and gas layers share the same #d4a24e toggle color in the sidebar

apps/web/public/atlas/index.html:334

Both 'Gasoductos · CENAGAS' and 'Ductos de gas · CNH' are listed with #d4a24e in TOGS, making them visually indistinguishable in the layer toggle sidebar. A slightly lighter/desaturated variant (e.g. #c49a3a) would disambiguate while staying thematically coherent.

History · 16 commits

  1. 91aaedfsafeincremental0H · 1M · 1L2026-08-12 17:35
  2. cb8d915needs attentionincremental2H · 5M · 3L2026-08-12 17:29
  3. 4cbbe8aneeds attentionincremental0H · 3M · 8L2026-08-12 14:01
  4. 4aa3c02needs attentionincremental2H · 3M · 3L2026-08-12 02:35
  5. f5630b2needs attentionincremental0H · 4M · 5L2026-08-12 02:17
  6. 28fde5bneeds attentionincremental1H · 2M · 2L2026-08-12 01:53
  7. 0babe51needs attentionincremental1H · 2M · 5L2026-08-12 01:23
  8. 50e8a8cneeds attentionincremental3H · 5M · 7L2026-08-11 23:58
  9. 3af4686needs attentionincremental3H · 5M · 5L2026-08-03 20:07
  10. f5d3266needs attentionincremental0H · 3M · 8L2026-08-03 19:40
  11. 9f8b61aneeds attentionincremental0H · 2M · 3L2026-08-03 19:15
  12. ea51fa0needs attentionincremental1H · 4M · 4L2026-08-03 19:02
  13. 2b33f2fneeds attentionincremental0H · 1M · 1L2026-07-18 05:09
  14. 2f8cf79needs attentionincremental1H · 3M · 4L2026-07-18 00:59
  15. 1616332safeincremental0H · 0M · 1L2026-07-18 00:22current
  16. e997fd8needs attentionfull1H · 4M · 6L2026-07-17 23:53