handleiding_nieuw:sub_spacematrix
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| handleiding_nieuw:sub_spacematrix [2025/05/13 15:04] – support | handleiding_nieuw:sub_spacematrix [2025/11/27 06:51] (current) – support | ||
|---|---|---|---|
| Line 29: | Line 29: | ||
| < | < | ||
| - | <h1>Spacematrix & Voorzieningen</h1> | + | <h1>Stedelijke Dichtheidsrekenmachine</h1> |
| <div class=" | <div class=" | ||
| <div class=" | <div class=" | ||
| Line 59: | Line 59: | ||
| </ | </ | ||
| <div class=" | <div class=" | ||
| - | <img src="https:// | + | <img src="/ |
| <div class=" | <div class=" | ||
| </ | </ | ||
| Line 257: | Line 257: | ||
| function updateStipje(fsi, | function updateStipje(fsi, | ||
| const stip = document.getElementById(" | const stip = document.getElementById(" | ||
| - | | + | |
| - | const y = Math.max(0, Math.min(100, | + | // Afbeeldingskalibratie (pixels of procenten afhankelijk van verhoudingen) |
| + | // GSI 0 → linksrand, GSI 0.5 → ongeveer 90% breedte | ||
| + | | ||
| + | |||
| + | // FSI 0 → onderrand, FSI 3 → bovenzijde (ongeveer 5% marge boven) | ||
| + | const y = Math.max(0, Math.min(100, | ||
| stip.style.left = `${x}%`; | stip.style.left = `${x}%`; | ||
| stip.style.top = `${y}%`; | stip.style.top = `${y}%`; | ||
| Line 610: | Line 616: | ||
| } | } | ||
| - | // 👇 Deze functies zetten | + | // 👇 Bouw de volledige woningtype + parkeren-tabel met eerste kolom labels, geschikt |
| - | + | function | |
| - | function | + | |
| const types = ["egw sociaal", | const types = ["egw sociaal", | ||
| " | " | ||
| - | | + | |
| - | | + | const kolommen = [...types, ...parkeerkolommen]; |
| - | | + | |
| + | const labelWidth = 18; | ||
| - | const perc = types.map((_, i) => document.getElementById(`perc_${i}`).value || " | + | const pad = (val) => val.toString().padStart(colWidth); |
| - | const bvo = types.map((_, i) => document.getElementById(`bvo_${i}`).value || " | + | const head = (val) => val.toString().padEnd(colWidth); |
| - | const aantallen | + | const label = (txt) => `| ${txt}`.padEnd(labelWidth); |
| - | const bvo_tot = types.map((_, i) => document.getElementById(`totbvo_${i}`).innerText || " | + | |
| - | | + | |
| - | | + | const perc = types.map((_, i) => document.getElementById(`perc_${i}`)? |
| - | | + | |
| - | | + | |
| + | | ||
| + | const bvo_tot | ||
| + | const gbo = bvo.map((b, i) => (b * vormfactor[i]).toFixed(1)); | ||
| - | | + | |
| - | } | + | const pp = parseFloat(document.getElementById(" |
| + | const woningen = aantallen.reduce((acc, | ||
| + | const bvo_pp = parseFloat(document.getElementById("bvo_per_pp" | ||
| + | const perc_boven = parseFloat(document.getElementById(" | ||
| + | const perc_onder = parseFloat(document.getElementById("pp_ondergronds")?.value || 30); | ||
| + | const pp_boven = Math.round(woningen * pp * (perc_boven / 100)); | ||
| + | const pp_onder = Math.round(woningen * pp * (perc_onder / 100)); | ||
| + | const bvo_boven = pp_boven * bvo_pp; | ||
| + | const bvo_onder = pp_onder * bvo_pp; | ||
| - | function buildVoorzieningenTable() { | + | // PARKEERGEGEVENS toevoegen |
| - | | + | |
| - | { naam: "Huisarts" | + | |
| - | { naam: " | + | |
| - | { naam: " | + | |
| - | { naam: " | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | const row = document.getElementById(`vchk_${i}`); | + | const r = []; |
| - | | + | r.push(label(" |
| - | const el = document.querySelector(`# | + | r.push("" |
| - | const m2 = el ? el.innerText : "-"; | + | r.push(label(" |
| - | rows.push(`${v.naam} | ${m2}`); | + | |
| - | } | + | r.push(label(" |
| - | | + | |
| + | r.push(label(" | ||
| + | | ||
| - | | + | |
| - | } | + | const woningtypes = [...Array(10).keys()]; |
| + | const totale_bvo = woningtypes.reduce((sum, | ||
| + | const totale_gbo = woningtypes.reduce((sum, | ||
| + | const totaal_woningen = woningtypes.reduce((sum, | ||
| - | function buildPlankaartTable() { | + | |
| - | | + | const gemiddelde_gbo |
| - | const labels = [" | + | |
| - | + | ||
| - | const footprint = parseFloat(document.getElementById(" | + | |
| - | const tuin = parseFloat(document.getElementById("m2_tuinen" | + | |
| - | const verharding = [" | + | |
| - | .map(id | + | |
| - | .reduce((a, b) => a + b, 0); | + | |
| - | + | ||
| - | let rows = [" | + | |
| - | ids.forEach((id, | + | |
| - | const el = document.getElementById(id); | + | |
| - | if (el) { | + | |
| - | rows.push(`${labels[i]} | ${el.value || el.innerText || ' | + | |
| - | } | + | |
| - | }); | + | |
| - | rows.push(`Footprint (GSI x opp) | ${footprint.toFixed(0)} m²`); | + | |
| - | rows.push(`Totaal uitgeefbaar | ${(footprint + tuin).toFixed(0)} m²`); | + | |
| - | rows.push(`Totaal verharding | ${verharding.toFixed(0)} m²`); | + | |
| - | + | ||
| - | return rows.join("\n"); | + | |
| - | } | + | |
| - | function buildGrexTable() { | + | r.push("" |
| - | const getVal = id => parseFloat(document.getElementById(id)? | + | |
| - | const rijbanen = getVal("m2_rijbanen"); | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | const groen = getVal(" | + | |
| - | const water = getVal(" | + | |
| - | const totaalopp = parseFloat(document.getElementById(" | + | |
| - | const nazorg = rijbanen * 0.10; | + | |
| - | return | + | return |
| - | " | + | |
| - | `Verwerving | Percelen te verwerven of in te brengen | ${totaalopp.toFixed(0)}`, | + | |
| - | `Grondwerk | Graven watergangen | ${water.toFixed(0)}`, | + | |
| - | `Bouwrijp maken | Bouwstraten | ${rijbanen.toFixed(0)}`, | + | |
| - | `Woonrijp maken | Rijbanen | ${rijbanen.toFixed(0)}`, | + | |
| - | `Woonrijp maken | Trottoirs | ${trottoirs.toFixed(0)}`, | + | |
| - | `Woonrijp maken | Parkeren | ${parkeren.toFixed(0)}`, | + | |
| - | `Woonrijp maken | Pleinen | ${pleinen.toFixed(0)}`, | + | |
| - | `Woonrijp maken | Groen | ${groen.toFixed(0)}`, | + | |
| - | " | + | |
| - | " | + | |
| - | `Nazorg | Herstraten bestratingen (10% rijbanen) | ${nazorg.toFixed(0)}`, | + | |
| - | " | + | |
| - | ].join(" | + | |
| } | } | ||
| Line 709: | Line 688: | ||
| try { | try { | ||
| - | const response = await fetch(' | + | const response = await fetch(' |
| if (!response.ok) throw new Error(`Bestand niet bereikbaar (${response.status})`); | if (!response.ok) throw new Error(`Bestand niet bereikbaar (${response.status})`); | ||
| Line 740: | Line 719: | ||
| totbvo_boven: | totbvo_boven: | ||
| totbvo_onder: | totbvo_onder: | ||
| - | voorzieningen_table: | + | |
| + | | ||
| plankaart_table: | plankaart_table: | ||
| grex_table: buildGrexTableTXT() | grex_table: buildGrexTableTXT() | ||
| Line 780: | Line 760: | ||
| function buildPlankaartTableTXT() { | function buildPlankaartTableTXT() { | ||
| + | const opp = parseFloat(document.getElementById(" | ||
| + | const gsi = parseFloat(document.getElementById(" | ||
| + | const footprint = gsi * opp; | ||
| + | const tuin = getVal(" | ||
| + | const uitgeefbaar = tuin + footprint; | ||
| + | |||
| return `Omschrijving | return `Omschrijving | ||
| ----------------------------|---------------- | ----------------------------|---------------- | ||
| - | Totaal bruto plangebied | + | Totaal bruto plangebied |
| ----------------------------|---------------- | ----------------------------|---------------- | ||
| - | Tuinen | + | Tuinen |
| - | Footprint (GSI x opp) | ${(parseFloat(document.getElementById(" | + | Footprint (GSI x opp) | ${footprint.toFixed(0)} |
| ----------------------------|---------------- | ----------------------------|---------------- | ||
| - | Totaal uitgeefbaar | + | Totaal uitgeefbaar |
| Rijbanen | Rijbanen | ||
| Trottoirs | Trottoirs | ||
| Line 793: | Line 779: | ||
| Pleinen | Pleinen | ||
| ----------------------------|---------------- | ----------------------------|---------------- | ||
| - | Totaal verharding | + | Totaal verharding |
| Groen | ${getVal(" | Groen | ${getVal(" | ||
| Water | ${getVal(" | Water | ${getVal(" | ||
handleiding_nieuw/sub_spacematrix.1747148666.txt.gz · Last modified: 2025/05/13 15:04 by support