<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>View the Golden Gate Bridge on a map</title>
<meta name="description" content="Explore the georeferenced IFC4x3 model of the Golden Gate Bridge and inspect its towers, deck and approaches on a map of San Francisco Bay.">
<style>
html, body { height: 100%; margin: 0; }
#example-viewer-mount { position: absolute; inset: 0; }
bim-grid#ifc-viewer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.example-ui { position: fixed; z-index: 2; right: 12px; bottom: 58px; width: 252px;
max-width: calc(100vw - 72px); box-sizing: border-box; padding: 10px 12px; border: 1px solid #dfe3e8;
border-radius: 4px; background: #fff; color: #233041; font: 12px/1.45 system-ui, sans-serif; }
.example-ui h1 { margin: 0; font-size: 15px; line-height: 1.3; }
.example-ui p { margin: 6px 0 0; }
.example-ui .credit { color: #516174; font-size: 11px; }
.example-ui button { margin-top: 8px; font: inherit; }
@media (max-width: 500px) { .example-ui { right: 8px; bottom: 52px; padding: 8px 10px; } }
</style>
<!-- generated:example-seo:start -->
<link rel="canonical" href="https://viewer.flinker.app/examples/golden-gate-bridge/index.html">
<meta name="robots" content="index,follow">
<meta property="og:title" content="View the Golden Gate Bridge on a map">
<meta property="og:description" content="Explore the georeferenced IFC4x3 model of the Golden Gate Bridge and inspect its towers, deck and approaches on a map of San Francisco Bay.">
<meta property="og:url" content="https://viewer.flinker.app/examples/golden-gate-bridge/index.html"><meta property="og:type" content="article">
<meta property="og:site_name" content="Flinker IFC Viewer"><meta property="og:image" content="https://viewer.flinker.app/examples/golden-gate-bridge/thumbnail.webp">
<meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="View the Golden Gate Bridge on a map">
<meta name="twitter:description" content="Explore the georeferenced IFC4x3 model of the Golden Gate Bridge and inspect its towers, deck and approaches on a map of San Francisco Bay."><meta name="twitter:image" content="https://viewer.flinker.app/examples/golden-gate-bridge/thumbnail.webp">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"View the Golden Gate Bridge on a map","description":"Explore the georeferenced IFC4x3 model of the Golden Gate Bridge and inspect its towers, deck and approaches on a map of San Francisco Bay.","url":"https://viewer.flinker.app/examples/golden-gate-bridge/index.html","mainEntityOfPage":"https://viewer.flinker.app/examples/golden-gate-bridge/index.html","image":"https://viewer.flinker.app/examples/golden-gate-bridge/thumbnail.webp","inLanguage":"en","author":{"@type":"Organization","name":"Flinker","url":"https://www.flinker.app/"}}</script>
<!-- generated:example-seo:end -->
<script type="application/json" id="example-data">
{
"category": "Infrastructure",
"formats": [
"IFC"
],
"capabilities": [
"IFC4x3",
"Bridges",
"Maps",
"Terrain"
],
"audience": "BIM workflow",
"order": 22.1,
"viewer": {
"assetIds": [
"golden-gate-bridge"
],
"presentation": "map"
},
"assets": [
{
"id": "golden-gate-bridge",
"name": "Golden Gate Bridge.ifc",
"format": "IFC",
"bytes": 8334145,
"sourceUrl": "https://www.fisheries.noaa.gov/inport/item/73386/full-list",
"license": "Apache-2.0",
"licenseUrl": "https://www.apache.org/licenses/LICENSE-2.0",
"noticeUrl": "https://viewer.flinker.app/examples/golden-gate-bridge/index.html#example-notices",
"attribution": "Original Flinker reconstruction from USGS 3DEP lidar and Golden Gate Bridge District public dimensions.",
"url": "https://raw.githubusercontent.com/flinker-app/ifc-sample-files/88e19691a436ed4740a9904bfd4de48accaa3e1d/Golden_Gate_Bridge/Golden%20Gate%20Bridge.ifc",
"sha256": "6bf3cb2590ace574de9b004c0a55560134cc9c2feb4da4e959790b8001285732",
"notes": "Flinker authored the IFC4x3 geometry and map placement."
}
]
}
</script>
</head>
<body>
<main id="example-viewer-mount" aria-label="View the Golden Gate Bridge on a map"><bim-grid id="ifc-viewer"></bim-grid></main>
<aside class="example-ui" aria-label="Golden Gate Bridge instructions">
<h1 data-example-title>View the Golden Gate Bridge on a map</h1>
<p>Use <strong>View → Layers</strong> to switch basemaps. Select a bridge component, then click the selection count to open <strong>Properties</strong>.</p>
<p class="credit"><a href="https://www.apache.org/licenses/LICENSE-2.0">Flinker · Apache 2.0</a> · <a href="https://www.fisheries.noaa.gov/inport/item/73386/full-list">Survey reference</a></p>
<button id="retry" type="button" hidden>Retry sample</button>
</aside>
<template id="example-guide">
<h2>Explore the bridge in context</h2>
<p>The IFC4x3 model opens on a map of San Francisco Bay. Use <strong>View → Layers</strong> to switch between street and satellite maps. Orbit to inspect the towers and deck, or select a component and open its properties from the selection count.</p>
<p>The model declares WGS 84 / UTM zone 10N (EPSG:32610) horizontally and NAVD88 height (EPSG:5703) vertically. Its IFC map conversion places the local origin at the San Francisco tower and rotates the longitudinal axis toward the Marin tower. A horizontal grid factor fits the published span length to the projected tower separation while preserving NAVD88 elevations.</p>
<p>The main span is 1,280.16 m, each suspended side span is 342.90 m, and the exterior deck width is 27.432 m. The 2023 lidar fit uses 210 sampled stations along the roadway. The fitted tower tops are about 229.6 m NAVD88. The cable curves, portal details, exterior piers, approach limits and other details between the survey references are reconstructed. Use the model for map placement and visual inspection.</p>
</template>
<template id="example-notices">
<h2>Sources and model licence</h2>
<p>The Golden Gate Bridge IFC is original geometry released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. The survey and references have their own credits below.</p>
<ul>
<li><a href="https://www.fisheries.noaa.gov/inport/item/73386/full-list">2023 USGS Lidar: San Francisco, CA, NOAA InPort 73386</a> supplied the horizontal tower positions and observed deck elevations.</li>
<li><a href="https://www.goldengate.org/bridge/history-research/statistics-data/design-construction-stats/">Golden Gate Bridge District design and construction statistics</a> supplied the published lengths, widths and cable diameter. The District’s <a href="https://www.goldengate.org/exhibits/hanging-the-roadway-deck/">deck exhibit</a> supplied the truss depth and suspender spacing.</li>
<li><a href="https://www.loc.gov/item/38009362/">1937 chief engineer’s report, Library of Congress</a> and the District’s <a href="https://www.goldengate.org/exhibits/fort-point-arch/">Fort Point Arch exhibit</a> supplied the historical context for the visible approaches and arch.</li>
<li><a href="https://www.goldengate.org/bridge/bridge-maintenance/painting-the-bridge/">Bridge District paint guidance</a> supplied the reference for International Orange.</li>
</ul>
<p>The model represents the visible exterior. Surveys, imagery and terrain may come from different dates and use different sampling resolutions.</p>
</template>
<script type="module">
import { Viewer } from "https://cdn.flinker.app/ifc-viewer/v4.0.28/ifc-viewer.es.js";
async function loadExampleFile(name, url, load = blob => viewer.add(name, blob), size = 0) {
const show = stage => viewer.setMessage(name + ': ' + stage, { type: 'loading' });
const chunks = [], chunkSize = 4 * 1024 * 1024;
let offset = 0, attempts = 0, action = 'download', type = '';
try {
await show('Downloading');
while (!size || offset < size) {
try {
const end = Math.min(offset + chunkSize, size || Infinity) - 1;
const response = await fetch(url, {
headers: { Range: 'bytes=' + offset + '-' + end },
cache: 'no-store', signal: AbortSignal.timeout(60000),
});
if (!response.ok) {
await response.body?.cancel();
// GitHub raw hides Content-Range from browser JavaScript: probe EOF.
if (response.status === 416 && offset && !size) break;
throw Object.assign(new Error('HTTP ' + response.status), { retry: [408, 429].includes(response.status) || response.status >= 500 });
}
const range = response.headers.get('content-range')?.match(/^bytes (\d+)-(\d+)\/(\d+)$/);
if (range && Number(range[1]) !== offset) throw new TypeError('Unexpected byte range');
size ||= Number(range?.[3]) || 0;
const bytes = await response.arrayBuffer();
const expected = response.status === 206 ? (size ? Math.min(chunkSize, size - offset) : 0) : size;
if (!bytes.byteLength || (expected && bytes.byteLength !== expected) || (response.status === 206 && bytes.byteLength > chunkSize))
throw new TypeError('Incomplete download at byte ' + offset);
if (response.status === 200) chunks.length = 0; // Server ignored Range.
chunks.push(bytes);
offset = response.status === 200 ? bytes.byteLength : offset + bytes.byteLength;
type = response.headers.get('content-type') || '';
attempts = 0;
if (response.status === 200) break;
await show('Downloading' + (size ? ' ' + Math.round(offset / size * 100) + '%' : ''));
}
catch (error) {
if (error.retry === false || ++attempts === 3) throw error;
await show('Retrying download');
await new Promise(resolve => setTimeout(resolve, 500 * 2 ** (attempts - 1)));
}
}
action = 'open';
const result = await load(new Blob(chunks, { type }), show);
if (result?.isError) throw new Error('The viewer could not open the file');
await viewer.setMessage(null);
return result;
}
catch (error) {
throw new Error('Could not ' + action + ' ' + name + (action === 'download' ? ' from ' + url : '') + ': ' + error.message, { cause: error });
}
}
const { assets: [asset] } = JSON.parse(document.getElementById('example-data').textContent);
const viewer = new Viewer('#ifc-viewer');
window.exampleViewer = viewer;
const retry = document.getElementById('retry');
let imported = false;
async function load() {
retry.hidden = true;
document.body.dataset.exampleState = 'loading';
try {
await viewer.ready;
if (!imported) {
await viewer.enableCopilot();
await loadExampleFile(asset.name, asset.url, undefined, asset.bytes);
imported = true;
}
await viewer.toggleMap(true);
document.body.dataset.exampleState = 'loaded';
} catch (error) {
document.body.dataset.exampleState = 'error';
await viewer.setMessage(error instanceof Error ? error.message : String(error), { type: 'error' });
retry.hidden = false;
}
}
retry.addEventListener('click', () => { void load(); });
void load();
</script>
</body>
</html>