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/09 13:57] – external edit 127.0.0.1 | handleiding_nieuw:sub_spacematrix [2025/05/19 10:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 107: | Line 107: | ||
| | ||
<div style=" | <div style=" | ||
- | <button onclick=" | + | <button onclick=" |
📄 Kickstart Dump downloaden | 📄 Kickstart Dump downloaden | ||
</ | </ | ||
Line 610: | Line 610: | ||
} | } | ||
- | // 👇 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_bvo = totaal_woningen > 0 ? (totale_bvo / totaal_woningen).toFixed(1) : "0"; |
- | const ids = ["opp", " | + | const gemiddelde_gbo |
- | const labels | + | |
- | | + | |
- | | + | |
- | | + | |
- | .map(id => parseFloat(document.getElementById(id).innerText) || 0) | + | r.push(`Gemiddelde GBO per woning: ${gemiddelde_gbo}`); |
- | .reduce((a, b) => a + b, 0); | + | |
- | | + | return |
- | 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²`); | + | |
- | + | ||
- | | + | |
- | } | + | |
- | + | ||
- | 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 740: | Line 713: | ||
totbvo_boven: | totbvo_boven: | ||
totbvo_onder: | totbvo_onder: | ||
- | voorzieningen_table: | + | |
+ | | ||
plankaart_table: | plankaart_table: | ||
grex_table: buildGrexTableTXT() | grex_table: buildGrexTableTXT() | ||
Line 780: | Line 754: | ||
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 773: | ||
Pleinen | Pleinen | ||
----------------------------|---------------- | ----------------------------|---------------- | ||
- | Totaal verharding | + | Totaal verharding |
Groen | ${getVal(" | Groen | ${getVal(" | ||
Water | ${getVal(" | Water | ${getVal(" |
handleiding_nieuw/sub_spacematrix.1746799073.txt.gz · Last modified: 2025/05/09 13:57 by 127.0.0.1