An ArcGIS SDK TypeScript Frontend Application — interactive 3D map for the GOOS report card.
npm install
npm run devMap layers load static GeoJSON from public/geojson/{layerId}.geojson (see src/categories.ts).
Regenerate map layers from OceanOPS PostgreSQL via oceanops-data-exports (clone next to this repo).
# Requires psql + Postgres with oceanops_gis.ptf_loc_n (local Docker or partial dump)
npm run export:geojson
# Preview SQL without writing files
npm run export:geojson:dry-run
# Partner country JSON for the globe filter (also updates report-card TS)
npm run export:partnersAdvanced flags (run from ../oceanops-data-exports):
node export-geojson.mjs --layer=argoEnvironment:
OCEANOPS_DATABASE_URL— defaultpostgresql://oceanops:oceanops@127.0.0.1:5432/oceanopsGEOJSON_EXPORT_EDITION— label in export summary
Configuration: edit ../oceanops-data-exports/sql/*.sql before each edition (see sql/README.md). Layer list: ../oceanops-data-exports/geojson-export/layers.manifest.json.
- Point layers:
WHEREonoceanops_gis.ptf_loc_n(+ joins for ship/sensor country in the SQL file) - Line layers: GO-SHIP design table; OceanTraX
soop_xbt_design_2023_2024withline_status IN ('active','reactivate')inoceantrax.sql - Date cutoffs and status filters: edit directly in the relevant
.sqlfile
Output:
| Layer kind | Files |
|---|---|
| Points (12) | public/geojson/{id}.geojson |
| Lines (GO-SHIP, SOOP XBT) | {id}_undensified.geojson + densified {id}.geojson |
Point layers join oceanops.v_ptf_depl_rv for country_ship (only when deployment_date is within ship commissioned/decommissioned dates; excludes UNKNOWN) and oceanops.v_sensor_provider for country_sensor_provider when those views exist.
Line layers do not include ship/sensor country fields.
Criteria mirror oceanops-report-card/scripts/partner-export/exportConfig.mjs (same edition filters).
Line layers are densified automatically during export:geojson. Logic lives in oceanops-data-exports/geojson-export/densifyLayer.mjs (default hybrid, 80 km).
After hand-editing *_undensified.geojson:
# From oceanops-data-exports (canonical)
npm run densify:geojson -- public/geojson/goship_undensified.geojson public/geojson/goship.geojson
# From simple-map (same CLI via wrapper)
npm run densify:geojson -- public/geojson/goship_undensified.geojson public/geojson/goship.geojson
# or: node densify.js public/geojson/goship_undensified.geojson public/geojson/goship.geojsonThis repo includes netlify.toml (npm run build, publish dist, Node 20). The app is served at /demos/simple-arcgis-map/ (same path as production) via path rewrites.
- Add new site → Import from Git →
OceanOPS/oceanops-simple-map. - Confirm build settings (Netlify reads
netlify.tomlautomatically). - Deploy production from your main branch (e.g.
mainorstaging). - Site configuration → Build & deploy → Deploy contexts → enable Deploy Previews for pull requests (same as report card).
After deploy, open:
https://<your-site>.netlify.app/demos/simple-arcgis-map/
PR previews:
https://deploy-preview-<PR>--<your-site>.netlify.app/demos/simple-arcgis-map/
In oceanops-report-card, set at build time:
VITE_MAP_SRC=https://deploy-preview-42--oceanops-simple-map.netlify.app/demos/simple-arcgis-map/- Local:
.env.local(see report-card README). - Netlify (report card site): Environment variables → add
VITE_MAP_SRCfor Deploy previews (or a specific branch), then redeploy the report card.
Trailing slash on VITE_MAP_SRC matches App.tsx defaults.