# Sessie werken in MapComplete editor
###### tags: `MapComplete`
## Ontwikkelen zonder 500 changesets
* tijdelijke staging-omgeving:
https://pietervdvn.github.io/Staging/
* met JSON-only:
* zet de JSON ergens online (vb https://github.com/osmbe/play)
* voeg toe aan MapComplete via https://mapcomplete.osm.be/?&userlayout=[URL] waarbij de URL bijvoorbeeld https://raw.githubusercontent.com/osmbe/play/master/mapcomplete/campersites.json
* URL parameters:
* &test=true : "editeren" zonder OSM echt te bewerken
* &debug=true : toon alle tags van de geladen objecten
# Workflow
## Data-modelling
* theorie via wiki.openstreetmap.org
* gebruik in België via Overpass-turbo of https://taginfo.geofabrik.de/europe/belgium/
* gebruik wereldwijd via taginfo.openstreetmap.org
## Start in ThemeBuilder
Basic features en eenvoudig testen via
https://pietervdvn.github.io/Staging/customGenerator.html
## JSON-only editing
Eens je wat geavanceerder wil gaan, sla op als JSON file en zet die ergens online.
JSON valideren:
https://jsonlint.com/
## Icoontjes
https://thenounproject.com/
# Thema Afval
* losse containers: glas, kleding, papier/karton
* open vraag: welk niveau van detail willen we? Elke container echt afzonderlijk? > één container is één punt
* ref kan nuttig zijn in functie van andere datasets
## Datamodel:
* amenity=recycling + recycling_type=container
Issue: http://overpass-turbo.eu/s/16BV > 600 objecten zonder type. Negeren geen optie; opkuisen op voorhand of met MapComplete.
* Subtags:
* papier/karton: recycling:cardboard=yes + recycling:paper=yes
* recycling:glass_bottles=yes (MAAR we hebben ook "glass") + recycling:glass_bottles:colour
* enkel wit / enkel gekleurd (groen)
* wit+gekleurd in één pot
* wit+gekleurd gescheiden in één container
* recycling:clothes
* location=underground
* operator=*
Omgaan met aantallen: recycling:glass_bottles:count
## Vragen in de tool
* Is dit een containerpark of een losse container? recycling_type=container vs centre
* Is dit echt wel ook voor glazen ramen etc?
* Bestaat dit ding nog?
* Ondergronds of niet: default bovengronds (expliciet: overground), location=underground indien ondergronds
* Eventueel: vraag om te melden als er meerdere containers in één punt staan; maar wat dan als er containerstraatjes zijn
## Datakwaliteit
Combinatie van meerdere fracties op één container: kleine aantallen, zelf te fixen. Vb:
http://overpass-turbo.eu/s/16C4
## JSON
```
{
"id": "container",
"title": {
"nl": "Containers"
},
"shortDescription": {
"nl": "korte beschrijving thema"
},
"description": {
"nl": "lange beschrijving thema"
},
"language": [
"nl"
],
"maintainer": "",
"icon": "./assets/svg/bug.svg",
"version": "0",
"startLat": 51.1349,
"startLon": 4.4523,
"startZoom": 15,
"widenFactor": 0.05,
"socialImage": "",
"layers": [
{
"id": "container",
"name": {
"nl": "Afvalcontainers"
},
"minzoom": 14,
"overpassTags": {
"and": [
"amenity=recycling",
"recycling_type=container"
]
},
"title": {
"render": {
"nl": "Afvalcontainer"
},
"mappings": [
{
"if": {
"and": [
"recycling:glass_bottles=yes"
]
},
"then": {
"nl": "Glasbol"
}
},
{
"if": {
"and": [
"recycling:clothes=yes"
]
},
"then": {
"nl": "Kledingcontainer"
}
},
{
"if": {
"or": [
"recycling:cardboard=yes",
"recycling:paper=yes",
{
"and": [
"recycling:paper=yes"
]
}
]
},
"then": {
"nl": "Papiercontainer"
}
}
]
},
"description": {
"nl": "Laag met allerlei containers"
},
"tagRenderings": [
{
"render": {
"nl": ""
},
"question": {
"nl": "Wat voor afval kan je hier deponeren?"
},
"mappings": [
{
"if": {
"and": [
"recycling:glass_bottles=yes"
]
},
"then": {
"nl": "Dit is een glascontainer"
}
},
{
"if": {
"and": [
"recycling:clothes=yes"
]
},
"then": {
"nl": "Dit is een kledingcontainer"
}
},
{
"if": {
"and": [
"recycling:cardboard=yes",
"recycling:paper=yes",
{
"and": [
"recycling:paper=yes"
]
}
]
},
"then": {
"nl": "Dit is een papier- en kartoncontainer"
}
},
{
"if": {
"and": [
"recycling:cardboard=yes",
"recycling:paper=",
{
"and": [
"recycling:paper="
]
}
]
},
"then": {
"nl": "Dit is een papier- en kartoncontainer"
},
"hideInAnswer": true
},
{
"if": {
"and": [
"recycling:cardboard=",
"recycling:paper=yes",
{
"and": [
"recycling:paper=yes"
]
}
]
},
"then": {
"nl": "Dit is een papier- en kartoncontainer"
},
"hideInAnswer": true
}
],
"freeform": {
"key": "x"
}
},
{
"question": {
"nl": "Bevindt de kledingcontainer zich bovengronds?"
},
"mappings": [
{
"if": {
"and": [
"location=overground"
]
},
"then": {
"nl": "Deze kledingcontainer bevindt zich bovengronds"
}
},
{
"if": {
"and": [
"location=underground"
]
},
"then": {
"nl": "Deze kledingcontainer bevindt zich ondergronds"
}
}
]
},
{
"render": {
"nl": "Er staan hier {container_count} containers."
},
"freeform": {
"key": "container_count",
"type": "nat"
},
"question": {
"nl": "Hoeveel containers van dit type en van dezelfde eigenaar staan hier?"
}
},
{
"render": {
"nl": "Eigenaar {eig}"
},
"freeform": {
"key": "eig",
"addExtraTags": []
},
"mappings": [
{
"if": "eig=Curitas",
"then": {
"nl": "Eigendom van: Curitas"
}
},
{
"if": "eig=Humana",
"then": {
"nl": "Eigendom van: Humana"
}
},
{
"if": "eig=Wereld Missie Hulp",
"then": {
"nl": "Eigendom van: Wereld Missie Hulp"
}
}
],
"question": {
"nl": "Wie is eigenaar van deze kledingcontainer?"
}
}
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/svg/bug.svg",
"mappings": [
{
"if": {
"and": [
"recycling:glass_bottles=yes",
"recycling_type=container",
"amenity=recycling"
]
},
"then": {
"nl": "https://raw.githubusercontent.com/osmbe/play/master/mapcomplete/containers/noun_Glassrecycling_bin_501475.svg"
}
}
]
},
"width": {
"render": "8"
},
"iconSize": {
"render": "40,40,center"
},
"color": {
"render": "#00f"
},
"presets": [
{
"tags": [
"amenity=recycling",
"recycling_type=container",
"recycling:glass_bottles=yes",
"recycling:glass_bottles:colour=green;white",
"recycling:glass_bottles:count=1"
],
"title": {
"nl": "Glasbol met groen en wit glas"
},
"description": {
"nl": "Glasbol met groen en wit glas in één enkele container"
}
},
{
"tags": [
"amenity=recycling",
"recycling_type=container",
"recycling:clothes=yes",
"recycling:clothes:count=1",
"location=overground"
],
"title": {
"nl": "Kledingcontainer"
},
"description": {
"nl": "Kledingcontainer (default: bovengronds)"
}
}
]
}
],
"roamingRenderings": []
}
```