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/19 08:44] – 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 623: | Line 629: | ||
| const label = (txt) => `| ${txt}`.padEnd(labelWidth); | const label = (txt) => `| ${txt}`.padEnd(labelWidth); | ||
| + | // DATA per woningtype (alleen types, dus zonder parkeren) | ||
| const perc = types.map((_, | const perc = types.map((_, | ||
| - | const bvo = types.map((_, | + | const bvo = types.map((_, |
| - | const aantallen = types.map((_, | + | const aantallen = types.map((_, |
| - | const bvo_tot | + | const vormfactor |
| + | const bvo_tot = bvo.map((b, i) => b * aantallen[i]); | ||
| + | const gbo = bvo.map((b, i) => (b * vormfactor[i]).toFixed(1)); | ||
| + | // PARKEERREGELS berekenen | ||
| const pp = parseFloat(document.getElementById(" | const pp = parseFloat(document.getElementById(" | ||
| - | const woningen = aantallen.reduce((acc, | + | const woningen = aantallen.reduce((acc, |
| const bvo_pp = parseFloat(document.getElementById(" | const bvo_pp = parseFloat(document.getElementById(" | ||
| const perc_boven = parseFloat(document.getElementById(" | const perc_boven = parseFloat(document.getElementById(" | ||
| Line 638: | Line 648: | ||
| const bvo_onder = pp_onder * bvo_pp; | const bvo_onder = pp_onder * bvo_pp; | ||
| - | // Voeg parkeerdata toe | + | // PARKEERGEGEVENS toevoegen |
| - | perc.push(" | + | perc.push(" |
| - | bvo.push(bvo_pp.toFixed(0), bvo_pp.toFixed(0)); | + | bvo.push(bvo_pp, |
| - | aantallen.push(pp_boven.toString(), pp_onder.toString()); | + | aantallen.push(pp_boven, pp_onder); |
| - | | + | bvo_tot.push(bvo_boven, bvo_onder); |
| + | vormfactor.push(1.00, 1.00); | ||
| + | | ||
| + | // TABEL opbouwen | ||
| const r = []; | const r = []; | ||
| r.push(label(" | r.push(label(" | ||
| r.push("" | r.push("" | ||
| r.push(label(" | r.push(label(" | ||
| - | r.push(label(" | ||
| r.push(label(" | r.push(label(" | ||
| - | r.push(label(" | + | r.push(label(" |
| + | r.push(label(" | ||
| + | r.push(label(" | ||
| + | r.push(label(" | ||
| + | |||
| + | // GEMIDDELDES (alleen woningtypes, | ||
| + | const woningtypes = [...Array(10).keys()]; | ||
| + | const totale_bvo = woningtypes.reduce((sum, | ||
| + | const totale_gbo = woningtypes.reduce((sum, | ||
| + | const totaal_woningen = woningtypes.reduce((sum, | ||
| + | |||
| + | const gemiddelde_bvo = totaal_woningen > 0 ? (totale_bvo / totaal_woningen).toFixed(1) : " | ||
| + | const gemiddelde_gbo = totaal_woningen > 0 ? (totale_gbo / totaal_woningen).toFixed(1) : " | ||
| r.push("" | r.push("" | ||
| - | r.push(`Totale aantal woningen: ${woningen}`); | + | r.push(`Totale aantal woningen: ${totaal_woningen}`); |
| - | r.push(`Gemiddelde BVO per woning: | + | r.push(`Gemiddelde BVO per woning: |
| + | r.push(`Gemiddelde GBO per woning: ${gemiddelde_gbo}`); | ||
| return r.join(" | return r.join(" | ||
| - | } | ||
| - | |||
| - | |||
| - | function buildVoorzieningenTable() { | ||
| - | const voorzieningen = [ | ||
| - | { naam: " | ||
| - | { naam: " | ||
| - | { naam: " | ||
| - | { naam: " | ||
| - | ]; | ||
| - | let rows = ["Type | Oppervlak (m²)" | ||
| - | |||
| - | voorzieningen.forEach((v, | ||
| - | const row = document.getElementById(`vchk_${i}`); | ||
| - | if (row && row.checked) { | ||
| - | const el = document.querySelector(`# | ||
| - | const m2 = el ? el.innerText : " | ||
| - | rows.push(`${v.naam} | ${m2}`); | ||
| - | } | ||
| - | }); | ||
| - | |||
| - | return rows.join(" | ||
| - | } | ||
| - | |||
| - | function buildPlankaartTable() { | ||
| - | const getVal = (id) => parseFloat(document.getElementById(id)? | ||
| - | const getInput = (id) => parseFloat(document.getElementById(id)? | ||
| - | |||
| - | const ids = [" | ||
| - | const labels = [" | ||
| - | |||
| - | const opp = getInput(" | ||
| - | const gsi = getInput(" | ||
| - | const footprint = gsi * opp; | ||
| - | const tuin = getVal(" | ||
| - | const uitgeefbaar = Number(footprint)*1 + Number(tuin)*1; | ||
| - | const verharding = getVal(" | ||
| - | |||
| - | const col1 = 30; | ||
| - | const col2 = 16; | ||
| - | const pad = (txt, len) => txt.toString().padEnd(len); | ||
| - | const val = (v) => v.toString().padStart(col2); | ||
| - | |||
| - | let rows = []; | ||
| - | rows.push(" | ||
| - | rows.push(" | ||
| - | |||
| - | ids.forEach((id, | ||
| - | const el = document.getElementById(id); | ||
| - | const waarde = el?.value || el? | ||
| - | rows.push(pad(labels[i], | ||
| - | }); | ||
| - | |||
| - | rows.push(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | rows.push(pad(" | ||
| - | |||
| - | return rows.join(" | ||
| - | } | ||
| - | |||
| - | function buildGrexTable() { | ||
| - | const getVal = id => parseFloat(document.getElementById(id)? | ||
| - | const rijbanen = getVal(" | ||
| - | const trottoirs = getVal(" | ||
| - | const parkeren = getVal(" | ||
| - | const pleinen = getVal(" | ||
| - | const groen = getVal(" | ||
| - | const water = getVal(" | ||
| - | const totaalopp = parseFloat(document.getElementById(" | ||
| - | const nazorg = rijbanen * 0.10; | ||
| - | |||
| - | 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 757: | 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 829: | 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 842: | Line 779: | ||
| Pleinen | Pleinen | ||
| ----------------------------|---------------- | ----------------------------|---------------- | ||
| - | Totaal verharding | + | Totaal verharding |
| Groen | ${getVal(" | Groen | ${getVal(" | ||
| Water | ${getVal(" | Water | ${getVal(" | ||
handleiding_nieuw/sub_spacematrix.1747644286.txt.gz · Last modified: 2025/05/19 08:44 by support