← all branches

feat/atlas-gas

needs attention
7fb6107 · fullPR #322reviewed 2026-07-17 19:47 UTC2H · 3M · 4L · 4I
The branch
Purpose
First layer of a gated siting suite for data-center/industrial site selection, cross-referencing gas infrastructure with grid-capacity data
Goal
Add natural-gas pipeline network layer to the energy atlas with precise (OSM) + approximate (GEM) geometry, operator/capacity/status popups, and proper CC-BY + ODbL attribution
Sub-goals
  • SG-1: Add gas_pipelines.geojson with 233 features (OSM geometry + GEM attributes, hybrid approach)
  • SG-2: Render 3 map layers — glow, precise solid, approximate dashed — with amber color and toggle off by default
  • SG-3: Popup with operator, capacity (Bcm/año + MMpcd), status, cross-border badge, and provenance attribution
The changes (whole branch)
What
New 144 KB GeoJSON data file (233 pipeline features, OSM + GEM hybrid) + 14 net lines in atlas/index.html to load, style, and interact with the gas pipeline layers
Why
Enable data-center/industrial energy siting by adding gas infrastructure visibility to the existing grid-capacity atlas
Areas
apps/web/public/atlas/data/gas_pipelines.geojson+10apps/web/public/atlas/index.html+134
Blast
2 files, +14/−4 across atlas only; no backend, API, or Next.js changes
new-public-data-file CC-BY+ODbL-licensed siting-suite-first-layer
ci· CI status not available via tokencoderabbit· no .coderabbit.yaml

Findings · 12

correctness3

medium

Dual popups where gas pipeline overlaps plant/hub markers

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

gas/gas-approx render above plants/hubs. MapLibre fires every click handler for all layers at the click point — produces two stacked popups on overlap.

low

bcm renders as raw float, mmcfd uses toLocaleString() — inconsistent locale formatting

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

p.bcm outputs raw JS float; mmcfd uses (+p.mmcfd).toLocaleString(). In es-MX 2.48 should be 2,48.

info

112 OSM features display generic 'Gasoducto' popup

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

security1

low

GeoJSON property interpolation into innerHTML without escaping

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

Pre-existing pattern for all layers; theoretical risk only with static team-controlled data.

conventions1

info

precise filter uses integer 0/1 — implicit JSON data contract

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

tests1

info

No tests for atlas — consistent with existing pattern

improvement5

high

42% of visible pipeline segments show a bare 'Gasoducto' popup — no actionable data

apps/web/public/atlas/data/gas_pipelines.geojson

88/209 OSM features have n='Gasoducto', op='', st=null, bcm=null. Popup degrades to bare bold name. For a siting tool, dead-end popups on the majority of segments undermine the feature's value.

high

28 OSM cross-border pipeline segments missing xborder flag

apps/web/public/atlas/data/gas_pipelines.geojson

Sur de Texas-Tuxpan, Norte Crossing, Samalayuca-Sásabe, etc. carry xborder=null in OSM features. Cross-border status is material for siting (CRE vs FERC jurisdiction, security zones).

medium

Precise/approximate distinction not documented in the map legend

apps/web/public/atlas/index.html

Toggle shows label only; solid=OSM vs dashed=GEM is not keyed in the legend panel.

medium

gas-glow covers approximate pipelines with same glow as precise

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

gas-glow has no filter; approximate GEM routes get same amber glow as confirmed OSM geometry.

low

atlasEmit not called in gasClick — no analytics for pipeline interactions

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

No analytics hook in the gas popup handler. Needed before the layer is live for gating/metering.

seo1

info

Attribution text correctly includes ODbL + CC-BY — SEO pass