Themes: first version of circular economy theme

This commit is contained in:
Pieter Vander Vennet 2024-07-27 02:18:58 +02:00
parent 3acba29198
commit 592be68f09
20 changed files with 1917 additions and 11 deletions

1122
Cleanup.osc Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,166 @@
{
"minzoom": 1,
"pointRendering": [
{
"location": [
"point",
"centroid"
],
"marker": [
{
"icon": "circle",
"color": "white"
},
{
"icon": {
"render": "gear",
"mappings": [
{
"if": {
"or": [
"bicycle:repair=yes",
"service:bicycle:repair=yes"
]
},
"then": "./assets/layers/hackerspace/bicycle.svg"
}
]
}
}
]
}
],
"tagRenderings": [
"images",
"preset_description",
{
"question": {
"en": "What is the name of this repair workshop?"
},
"id": "name",
"render": {
"en": "This workshop is called <b>{name}</b>"
},
"freeform": {
"key": "name"
}
},
"opening_hours_by_appointment",
"contact",
"mastodon",
"facebook",
{
"question": {
"en": "What type of items are repaired here?"
},
"id": "item:repair",
"mappings": [
{
"if": "service:mobile_phone:repair=yes",
"alsoShowIf": "mobile_phone:repair=yes",
"addExtraTags": ["mobile_phone:repair="],
"then": {
"en": "Mobile phones are repaired here"
},
"ifnot": "service:mobile_phone:repair=no"
},
{
"if": "service:computer:repair=yes",
"alsoShowIf": "computer:repair=yes",
"addExtraTags": ["computer:repair="],
"then": {
"en": "Computers are repaired here"
},
"ifnot": "service:computer:repair=no"
},
{
"if": "service:bicycle:repair=yes",
"alsoShowIf": "bicycle:repair=yes",
"addExtraTags": ["bicycle:repair="],
"then": {
"en": "Bicycles are repaired here"
},
"ifnot": "service:bicycle:repair=no"
},
{
"if": "service:electronics:repair=yes",
"alsoShowIf": "bicycle:repair=yes",
"addExtraTags": ["bicycle:repair="],
"then": {
"en": "Electronic devices are repaired here"
},
"ifnot": "service:electronics:repair=no",
"icon": "./assets/layers/recycling/small_electrical_appliances.svg"
},
{
"if": "service:furniture:repair=yes",
"alsoShowIf": "furniture:repair=yes",
"addExtraTags": ["furniture:repair="],
"then": {
"en": "Furniture is repaired here"
},
"ifnot": "service:furniture:repair=no",
"icon": "./assets/layers/recycling/furniture.svg"
},
{
"if": "service:clothes:repair=yes",
"alsoShowIf": "clothes:repair=yes",
"addExtraTags": ["clothes:repair="],
"then": {
"en": "Clothes are repaired here"
},
"ifnot": "service:clothes:repair=no",
"icon": "./assets/layers/recycling/clothes.svg"
}
],
"multiAnswer": true
}
],
"lineRendering": [
{
"width": 1,
"color": "blue"
}
],
"id": "assisted_repair",
"name": {
"en": "Repair cafés and assisted repair workshops"
},
"description": {
"en": "A self-assisted workshop is a location where people can come and repair their goods with help of volunteers and with the tools available at the given location. A repair café is a type of event organized regularly along the same principles."
},
"source": {
"osmTags": "repair=assisted_self_service"
},
"title": {
"render": {
"en": "Workshop for assisted repair"
},
"mappings": [
{
"if": "name~*",
"then": {
"en": "{name}"
}
}
]
},
"deletion": {},
"allowMove": true,
"presets": [
{
"title": {
"en": "an assisted repair workshop"
},
"tags": [
"amenity=workshop",
"repair=assisted_self_service"
],
"description": {
"en": "A location with a permanent workshop where people can come to repair items with the help of volunteers."
}
}
]
}

View file

@ -141,12 +141,7 @@
}
],
"tagRenderings": [
{
"id": "ghost-bike-explanation",
"render": {
"*": "{preset_description()}"
}
},
"preset_description",
"images",
{
"question": {

View file

@ -2884,6 +2884,12 @@
}
}
]
},
{
"id": "preset_description",
"render": {
"*": "{preset_description()}"
}
}
]
}

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 639.27478 558.87305" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="a">
<stop stop-color="#5b87a3" offset="0"/>
<stop stop-color="#5b87a3" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="h" x1="550.7" x2="1417.5" y1="21.444" y2="837.51" gradientTransform="matrix(1.2769 0 0 .78316 -43.168 41.112)" gradientUnits="userSpaceOnUse">
<stop stop-color="#56809c" offset="0"/>
<stop stop-color="#56809c" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="g" x1="621.96" x2="657" y1="354.85" y2="443.21" gradientTransform="matrix(1.2588 0 0 .90029 -147.17 32.391)" gradientUnits="userSpaceOnUse">
<stop stop-color="#2b526f" offset="0"/>
<stop stop-color="#2b526f" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="f" x1="118.74" x2="197.94" y1="319.13" y2="427.42" gradientTransform="matrix(1.1669 0 0 .85699 -43.168 41.112)" gradientUnits="userSpaceOnUse">
<stop stop-color="#364d5f" offset="0"/>
<stop stop-color="#364d5f" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="c" x1="853.96" x2="1319.3" y1="318.36" y2="299.76" gradientTransform="matrix(.68977 0 0 1.4498 -43.168 41.112)" gradientUnits="userSpaceOnUse">
<stop stop-color="#476f87" offset="0"/>
<stop stop-color="#476f87" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="b" x1="162.7" x2="332.55" y1="910.61" y2="1956" gradientTransform="matrix(1.9885 0 0 .5029 -43.168 41.112)" gradientUnits="userSpaceOnUse">
<stop stop-color="#314657" offset="0"/>
<stop stop-color="#314657" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="e" x1="291.24" x2="307.16" y1="853.23" y2="565.63" gradientTransform="matrix(2.018 0 0 .49555 -43.168 41.112)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
<linearGradient id="d" x1="158.7" x2="186.43" y1="848.81" y2="799.48" gradientTransform="matrix(2.7566 0 0 .36277 -43.168 41.112)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
</defs>
<g transform="matrix(.84285 0 0 .84285 42.35 -32.967)" stroke="#00181a">
<path d="m173.33 46.926 468.2-1.4535c2.8246 61.401 3.0774 4.9332-1.0338 79.641l-6.3129 103.91c-68.316 11.792-156.63 107.15-159.81 107.15l-255.98 3.0104c-3.1773 0-8.6422-112.91-44.981-114.53l-5.8142-90.934c0-33.595-9.0704-66.456 5.7351-86.805z" fill="url(#h)" stroke-width="8.1496"/>
<path d="m636.55 341.27c0 15.044 3.8683 35.212-5.123 49.802s-30.842 23.602-51.756 23.602-28.956-7.9218-41.218-15.426-39.021-6.3674-76.813-4.6959c0-15.044 15.494-52.882 30.3-72.923s39.2-30.506 60.114-30.506 42.038 5.0147 57.933 13.79 26.563 21.313 26.563 36.357z" fill="url(#g)" stroke-width="8.6758"/>
<path d="m89.464 336.49c0 15.044 29.425 29.024 16.139 38.89s-63.652 2.7443-79.788 6.4162c-35.941 8.1786-71.986-12.613-71.986-27.657s5.6668-61.81 18.953-71.676 23.019-10.655 43.278-10.655 38.61 13.373 51.896 23.238 21.507 26.4 21.507 41.444z" fill="url(#f)" stroke-width="8.1496"/>
<path d="m214.71 319.36c2.9071 29.382-10.367 29.303-37.479 34.131-27.309 4.8631-29.313 16.368-66.221 16.368-23.826-15.989-23.507-25.148-22.822-59.351 0.28925-14.437-27.355-33.468-50.153-40.342s-40.748-1.5888-38.513-2.2772c11.375-3.5041 60.101-19.026 80.009-26.294 36.908 0 61.618-8.6951 91.637-20.946 37.719-15.394 43.542 78.05 43.542 98.711z" fill="#5b87a3" stroke-width="8.1496"/>
<path d="m693.78 324.55c0 14.442-20.804 46.068-28.544 45.916s-21.022 22.4-31.051 22.4c3.1978-23.257 2.8121-69.579-13.591-88.079-19.695-22.213-57.633-3.6804-92.518-18.03 21.803-14.349 44.842-38.696 71.441-44.193s46.586-11.041 66.645-11.041c10.029 0 37.847 36.876 37.983 48.305s-4.5514 30.279-10.366 44.721z" fill="#5985a2" stroke-width="8.1496"/>
<path d="m-24.351 400.14 549.6 8.7212c11.898 10.175 28.992-13.653 28.992 19.942l-1.4535 72.038c0 33.595-24.361 35.931-27.538 35.931l-299.59-11.628c-36.609-11.628-216.5-0.88244-242.66-21.396l-10.175-28.431c0-33.595-0.34921-75.177 2.828-75.177z" fill="url(#e)" stroke-width="8.1496"/>
<path d="m227.11 339.69 244.35 2.9071c20.485-14.535-20.473 38.604-4.5375 52.835s82.95-4.631 82.95 12.167l-55.11-0.0703-335.89-2.0226c-55.234-1.2895-146.81-5.6501-178.79-8.7212l15.262-12.762 85.032-1.1338c19.623-2.9891 19.899-1.0704 66.54-15.12 49.467-14.901 78.6-28.079 80.188-28.079z" fill="url(#d)" stroke-width="8.1496"/>
<path d="m621.02 401.59 45.218-27.617c3.1773 0 1.3745 82.281 1.3745 115.88l-21.803 40.06c-21.803 24.874-47.618 47.56-50.795 47.56l-39.404 53.781c-11.898 2.9071-1.3745-60.478-1.3745-94.073l1.4535-109.33c0-33.595 59.246 2.8154 65.33-26.255z" fill="url(#c)" stroke-width="8.1496"/>
<path d="m4.7198 519.33 543.53 9.22c4.6308 11.628 1.6239 28.001 1.6239 61.596l-4.3606 45.874c0 33.595-146.46 2.5-149.64 2.5l-362.09-21.803c-3.1773 0-26.085 10.746-26.085-22.85l-8.7212-50.234c0-33.595 2.5579-24.303 5.7351-24.303z" fill="url(#b)" stroke-width="8.1496"/>
<path d="m25.069 618.17 65.567 4.3606c3.1773 0 7.1887 4.5583 7.1887 17.442s-20 13.082-23.178 13.082l-39.404 5.8142c-3.1773 0-8.6422-3.1048-8.6422-15.989s-4.7098-24.71-1.5326-24.71z" fill="#552523" stroke-width="8.1496"/>
<path d="m448.05 651.6 85.917-1.4535c3.1773 0-2.9861 13.928-2.9861 27.617s-14.186 20.35-17.363 20.35l-58.3-1.4535c-3.1773 0-4.2816-8.1136-4.2816-21.803s-6.1634-23.257-2.9861-23.257z" fill="#401e1d" stroke-width="8.1496"/>
<path d="m637.01 526.59 19.054-11.628c3.1773 0 6.0843 21.803 2.9071 21.803l-7.4258 11.628c-3.1773 0-17.713-21.803-14.535-21.803z" fill="#442322" stroke-width="8.1496"/>
<path d="m637.97 43.728c-18.236-2.0659-37.677 85.552-45.719 200.12 1.4606-0.41846 2.8925-0.97488 4.375-1.2812 26.6-5.4973 46.566-11.031 66.625-11.031 0.0846 0 0.194 0.05728 0.2812 0.0625 1.9057-105.4-8.3975-185.93-25.562-187.88z" fill="#5b87a3" stroke-width="9.1562"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: https://pixabay.com/users/clker-free-vector-images-3736/
SPDX-License-Identifier: CC0

View file

@ -79,6 +79,16 @@
"https://thenounproject.com/icon/tube-fluorescent-light-3756518/"
]
},
{
"path": "furniture.svg",
"license": "CC0-1.0",
"authors": [
"https://pixabay.com/users/clker-free-vector-images-3736/"
],
"sources": [
"https://pixabay.com/es/vectors/sof%C3%A1-sill%C3%B3n-muebles-silla-azul-29277/"
]
},
{
"path": "garden_waste.svg",
"license": "CC-BY-SA-4.0",

View file

@ -0,0 +1,151 @@
{
"credits": "Not logged in",
"minzoom": 3,
"pointRendering": [
{
"location": [
"point",
"centroid"
],
"marker": [
{
"icon": "pin",
"color": "#93E800FF"
},
{
"icon": "./assets/layers/bike_repair_station/repair_station.svg"
}
],
"anchor": "bottom",
"label": {
"mappings": [
{
"if": "name~*",
"then": {
"en": "{name}"
}
}
]
},
"labelCssClasses": "bg-white rounded px-2"
}
],
"tagRenderings": [
"images",
"contact",
"facebook",
"opening_hours_by_appointment",
{
"question": {
"en": "Is a membership required to borrow tools here?"
},
"id": "membership",
"mappings": [
{
"then": {
"en": "No membership is required to borrow tools here"
},
"if": "membership=no"
},
{
"if": "membership=required",
"then": {
"en": "A <b>membership is required</b> to use this tool library"
}
}
]
},
{
"question": {
"en": "How much does a membership cost?"
},
"id": "membership_charge",
"questionHint": {
"en": "There might be many formulas. In case of doubt, pick the most common one"
},
"freeform": {
"key": "charge:membership",
"type": "currency"
},
"condition": "membership=required",
"render": {
"en": "A membership costs {charge:membership}"
}
},
{
"question": {
"en": "Is a fee asked to borrow tools?"
},
"id": "fee",
"mappings": [
{
"if": "fee=no",
"then": {
"en": "Borrowing tools is free"
}
},
{
"if": "fee=yes",
"then": {
"en": "A fee is asked when borrowing tools"
}
},
{
"if": "fee=donation",
"then": {
"en": "A donation can be given when borrowing tools"
}
}
],
"questionHint": {
"en": "If a membership is required, we assume that the membership is already paid for."
}
}
],
"lineRendering": [
{
"width": 1,
"color": "blue"
}
],
"id": "tool_library",
"name": {
"en": "Tool libraries"
},
"description": {
"en": "A tool library is a place where people from the general public can borrow tools"
},
"source": {
"osmTags": "amenity=tool_library"
},
"title": {
"render": {
"en": "Tool library {name}"
}
},
"presets": [
{
"title": {
"en": "a tool library"
},
"tags": [
"amenity=tool_library"
],
"description": {
"en": "A tool library is a place where people from the general public can borrow tools"
}
}
],
"deletion": true,
"allowMove": true,
"units": [
{
"charge:membership": {
"inverted": true,
"quantity": "duration",
"denominations": ["years","months","weeks"]
}
}
]
}

View file

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
width="500"
height="500"
viewBox="0 0 500 500"
id="svg2"
sodipodi:docname="recycling-14.svg"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
showgrid="false"
units="px"
inkscape:zoom="0.97952115"
inkscape:cx="162.32421"
inkscape:cy="203.67095"
inkscape:current-layer="svg2"
width="500px"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1"
inkscape:window-width="1920"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" /><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs6"><style
id="style1">
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: #39434c;
}
</style></defs><rect
width="495.07648"
height="495.07648"
x="0"
y="0"
id="canvas"
style="visibility:hidden;fill:none;stroke:none;stroke-width:35.3626" /><path
d="M 166.81874,324.13153 107.8074,217.51922 H -10.873784 l 48.243254,28.95742 -29.8251971,53.2961 c -2.543629,4.83311 -3.815406,9.88019 -3.815296,15.14141 -1.1e-4,5.26143 1.27163,10.30857 3.815296,15.14136 l 46.9456591,84.88421 c 2.117413,-6.14489 4.234827,-11.41294 6.352424,-15.80403 L 119.2339,295.17408 Z m -88.197466,85.54686 c -3.395692,5.70317 -5.093684,11.84137 -5.093537,18.41463 -1.47e-4,10.09426 3.492457,18.649 10.477557,25.66409 6.984864,7.01516 15.338514,10.52265 25.060926,10.52265 h 116.7832 v -98.03747 h -123.1162 c -0.85243,1.75399 -4.028512,7.457 -9.528582,17.10931 z M 236.63688,166.85382 H 354.67893 L 414.3294,60.261629 366.1055,89.219013 336.26091,35.902825 C 330.7603,25.822402 322.30328,20.781993 310.89008,20.781527 h -93.93014 c 3.80861,4.378224 6.98476,8.762639 9.52862,13.153338 l 57.73312,103.961535 -9.50922,5.92401 z M 178.8844,26.042886 c -13.54423,4.25e-4 -23.69903,6.138644 -30.46433,18.414648 L 89.408698,149.74442 c 22.413922,13.60208 49.702062,29.83456 81.864472,48.69745 19.03105,-33.77665 39.54716,-70.62601 61.54842,-110.548232 L 209.34878,44.457534 C 202.58292,32.18153 192.42816,26.043311 178.8844,26.042886 Z M 330.56703,364.91692 V 353.06884 307.6848 l -59.03073,106.59226 59.03073,105.94957 v -57.25215 h 59.01132 c 11.42606,0 20.09604,-5.04711 26.0099,-15.14143 l 46.96505,-84.8841 c -6.3399,1.75398 -11.62715,2.63079 -15.86157,2.63079 l -116.1247,-0.66296 z m 87.5777,-180.29107 c -2.11814,1.31237 -29.41256,17.54473 -81.88382,48.69742 26.23543,46.93721 46.97104,84.00745 62.20688,111.21102 h 47.58483 c 13.96958,7e-5 24.33736,-6.14478 31.10348,-18.43483 6.33891,-11.84791 6.12591,-23.91014 -0.63932,-36.18674 L 418.14481,184.62585 Z"
id="recycling"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:36.9338" /><g
id="g1"
transform="matrix(0.51506564,0,0,0.51506564,99.245692,99.245692)"><circle
class="cls-2"
cx="287.91"
cy="287.91"
r="287.91"
id="circle1"
style="fill:#39ac4c;fill-opacity:1" /><path
id="path1"
class="cls-1"
d="m 285.88003,37.239958 c -16.88999,0 -36.53931,25.470744 -51.2793,66.470702 -5.34999,14.88999 -9.96125,31.31947 -13.78125,48.93945 -2.25,10.36999 5.64001,20.18946 16.25,20.18946 h 97.62109 c 10.60999,0 18.5,-9.80947 16.25,-20.18946 -3.81999,-17.61998 -8.43125,-34.04946 -13.78125,-48.93945 C 322.41934,62.710702 302.77001,37.239958 285.88003,37.239958 Z M 378.1769,50.43527 c -11.25006,-0.06515 -20.27351,11.744152 -15.23633,23.345703 2.48,5.709994 4.8704,11.749616 7.15039,18.09961 v -0.0098 c 7.26,20.179987 13.24915,42.888937 17.86915,67.378907 1.48999,7.87 8.33961,13.58985 16.3496,13.58985 h 81.29102 c 13.24999,0 21.1789,-14.73884 13.87891,-25.79883 -27.80998,-42.13996 -67.77044,-75.561509 -114.90039,-95.27149 -2.16094,-0.903124 -4.319,-1.321919 -6.40235,-1.333984 z m -184.70508,0.205078 c -2.08346,0.01565 -4.24297,0.440235 -6.40234,1.34961 -46.88995,19.72998 -86.64964,53.061062 -114.349609,95.041012 -7.299992,11.05999 0.630873,25.79883 13.88086,25.79883 h 80.859379 l -0.01,0.01 c 8.00999,0 14.85961,-5.71985 16.34961,-13.58985 4.61999,-24.48997 10.60915,-47.18892 17.86914,-67.378903 2.25,-6.269994 4.61055,-12.230865 7.06055,-17.880859 5.03718,-11.609989 -4.00709,-23.434133 -15.25782,-23.34961 z m 33.4375,157.189452 c -8.59999,0 -15.79859,6.53938 -16.55859,15.10938 -1.83,20.41998 -2.77148,41.6315 -2.77148,63.27148 0,21.63998 0.94172,42.75869 2.76171,63.13867 0.76,8.55999 7.96861,15.11133 16.5586,15.11133 h 117.9707 c 8.59999,0 15.80055,-6.55134 16.56055,-15.11133 1.82,-20.37998 2.75976,-41.53869 2.75976,-63.13867 0,-21.63998 -0.94148,-42.8515 -2.77148,-63.27148 -0.77,-8.56 -7.9686,-15.10938 -16.55859,-15.10938 z m 186.43164,0 c -9.72999,0 -17.35031,8.31954 -16.57031,18.01953 1.59,19.60998 2.41016,39.82135 2.41016,60.36133 0,20.53998 -0.81039,40.66854 -2.40039,60.22852 -0.78,9.69999 6.83032,18.02148 16.57031,18.02148 h 103.93945 c 7.62,0 14.21891,-5.19032 16.12891,-12.57031 5.32999,-20.54998 8.17187,-42.09057 8.17187,-64.31055 0,-23.34998 -3.14172,-45.95947 -9.01171,-67.43945 -1.98,-7.25999 -8.53837,-12.31055 -16.06836,-12.31055 z m -357.67187,0.01 c -7.519992,0 -14.078361,5.06055 -16.068359,12.31054 -5.869995,21.47998 -9.009766,44.08948 -9.009766,67.43946 0,23.34997 2.839927,43.76056 8.169922,64.31054 1.909998,7.38 8.508914,12.57032 16.128906,12.57032 H 158.39956 c 9.72999,0 17.35031,-8.31954 16.57031,-18.01953 -1.58,-19.56999 -2.40039,-39.74049 -2.40039,-60.23047 0,-20.48998 0.82016,-40.75135 2.41016,-60.36133 0.79,-9.69999 -6.83033,-18.01953 -16.57032,-18.01953 z m 181.37109,191.62109 c -10.60999,0 -18.49999,9.8097 -16.25,20.17969 3.83,17.66998 8.45056,34.15033 13.81055,49.07031 14.73999,40.99996 34.38931,66.46875 51.2793,66.46875 16.88998,0 36.53931,-25.46879 51.27929,-66.46875 5.37,-14.91998 9.98056,-31.40033 13.81055,-49.07031 2.25,-10.36999 -5.64001,-20.17969 -16.25,-20.17969 z m 167.28907,0 c -8.01,0 -14.85961,5.71985 -16.34961,13.58984 -4.63,24.52998 -10.62868,47.28002 -17.88868,67.5 -2.70999,7.54 -5.56054,14.62931 -8.56054,21.2793 -6.18,13.70999 7.57048,27.92093 21.48047,22.21094 48.91995,-20.06998 90.23995,-54.8802 118.41992,-98.91016 7.10999,-11.09999 -0.78095,-25.66992 -13.96094,-25.66992 z m -319.609379,0.01 c -13.179987,0 -21.070696,14.56993 -13.970703,25.66992 28.079972,43.86995 69.191142,78.57947 117.871092,98.68945 13.90999,5.74 27.67976,-8.46923 21.50977,-22.19922 -2.96,-6.57999 -5.78094,-13.61032 -8.46094,-21.07031 -7.26999,-20.21998 -13.26868,-42.97002 -17.88867,-67.5 -1.48,-7.86999 -8.32962,-13.58984 -16.34961,-13.58984 z"
style="fill:#53e5ff;fill-opacity:1" /></g></svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Pieter Vander Vennet
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,66 @@
{
"id": "circular_economy",
"title": {
"en": "Circular economy"
},
"icon": "./assets/themes/circular_economy/circular.svg",
"description": {
"en": "Various items which help people to share, reuse or recycle."
},
"layers": [
{
"builtin": "public_bookcase",
"override": {
"minzoom": 14
}
},
{
"builtin": [
"bicycle_library"
],
"override": {
"minzoom": 10
}
},
"bike_repair_station",
"tool_library",
"assisted_repair",
{
"builtin": "shops",
"override": {
"minzoom": 10,
"id": "shops_second_hand",
"=name": {
"en": "Second hand shops"
},
"filter": null,
"source": {
"=osmTags": {
"or": [
"shop=second_hand",
"shop=charity",
{
"and": [
"shop~*",
"second_hand=yes",
"second_hand=only"
]
}
]
}
},
"presets": null
}
},
{
"builtin": "shops",
"override": {
"minzoom": 17,
"name": null,
"filter": {
"sameAs": "shops_second_hand"
}
}
}
]
}

View file

@ -0,0 +1,10 @@
[
{
"path": "circular.svg",
"license": "CC0-1.0",
"authors": [
"Pieter Vander Vennet"
],
"sources": []
}
]

View file

@ -189,6 +189,10 @@
"if": "theme=charging_stations",
"then": "./assets/themes/charging_stations/logo.svg"
},
{
"if": "theme=circular_economy",
"then": "./assets/themes/circular_economy/circular.svg"
},
{
"if": "theme=climbing",
"then": "./assets/themes/climbing/climbing_icon.svg"

View file

@ -1,6 +1,6 @@
{
"name": "mapcomplete",
"version": "0.44.11",
"version": "0.44.12",
"repository": "https://github.com/pietervdvn/MapComplete",
"description": "A small website to edit OSM easily",
"bugs": "https://github.com/pietervdvn/MapComplete/issues",

View file

@ -0,0 +1,232 @@
import Script from "../Script"
import { writeFileSync } from "fs"
import { Feature, Geometry } from "geojson"
import { OsmObject } from "../../src/Logic/Osm/OsmObject"
import OsmObjectDownloader from "../../src/Logic/Osm/OsmObjectDownloader"
import { Changes } from "../../src/Logic/Osm/Changes"
import { ImmutableStore } from "../../src/Logic/UIEventSource"
import { OsmConnection } from "../../src/Logic/Osm/OsmConnection"
import ChangeTagAction from "../../src/Logic/Osm/Actions/ChangeTagAction"
import { Tag } from "../../src/Logic/Tags/Tag"
import { ChangeDescription } from "../../src/Logic/Osm/Actions/ChangeDescription"
import { GeoOperations } from "../../src/Logic/GeoOperations"
import { Overpass } from "../../src/Logic/Osm/Overpass"
import { TagUtils } from "../../src/Logic/Tags/TagUtils"
import { BBox } from "../../src/Logic/BBox"
export default class CleanRepair extends Script {
constructor() {
super("Cleans 'repair'-tags for mass retagging")
}
async main(args: string[]) {
const path = args[0]
console.log("Loading", path)
const criteria = TagUtils.Tag({
and: [
"repair~*",
"repair!=no",
"repair!=yes",
"repair!=brand",
"repair!=only",
"repair!=only_sold",
"repair!=assisted_self_service"
]
})
const overpass = new Overpass(criteria, [],
"https://overpass-api.de/api/interpreter"
)
const data: Feature<Geometry, Record<string, string>> [] = (await overpass.queryGeoJson(BBox.global))[0].features
console.log("Got", data.length, "features; sample", data[0])
const changes = new Changes({
dryRun: new ImmutableStore(true),
osmConnection: new OsmConnection({
dryRun: new ImmutableStore(true)
})
})
const metakeys = ["id", "version", "changeset", "user", "uid", "timestamp"]
const replace = {
"phone": "mobile_phone",
"phones": "mobile_phone",
"mobile": "mobile_phone",
"cellphone": "mobile_phone",
"pc": "computers",
"mobile_phones": "mobile_phone",
"mobilephones": "mobile_phone",
"mobilephone": "mobile_phone",
"clocks": "clock",
"elektronik": "electronics",
"tires": "tyres",
"welcome": "yes",
"tyre": "tyres",
"electronic_products": "electronics",
"shoe": "shoes",
"pc_repairs": "computer",
"computers": "computer",
"body_construction": "body_work",
"body": "body_work",
"body_repairer": "body_work",
"instruments": "musical_instrument",
"service": "yes",
"punture": "tyres",
"electricity": "electronics",
"self_service": "assisted_self_repair",
"paint": "bodywork",
"paint shop": "bodywork",
"paint_shop": "bodywork",
"lawnmower": "lawn_mower",
"aircon": "air_conditioning",
"*": "yes",
"ammeublement": "furniture",
"all": "yes",
"appliances": "appliance",
"electronic": "electronics", "escooter": "electric_scooter",
"aviation maintenance, repair, and_overhaul": "airplane",
"aviation_maintenance": "airplanes",
"bags": "bag",
"boats": "boat",
"boilers": "boiler",
"breaks": "brakes",
"car": "cars",
"tv": "television",
"clothing": "clothes",
"coat_of_lacquer": "body_work",
"cycle": "bicycle",
"cars": "car",
"blacharstwo": "tin", "lakiernictwo": "body_work",
"tire": "tyres", "powder_coating": "body_work",
"leather_products": "leather",
"motocycle": "motorcycle",
"motor": "motorcycle", "motoo": "motorcycle",
"motorbike": "motorcycle", "motorcycle_repair": "motorcycle", "motorsports": "motorcycle",
"printers": "printer",
"tyres24": "tyres",
"paintings": "painting",
"paintwork": "body_work",
"pumps": "pump",
"shoes:yes": "shoes",
"wheel": "tyres",
"wheels": "tyres",
"vacuum": "vacuum_cleaner",
"glass": "car_glassj"
}
const brands = ["garage", "audi", "renault", "apple", "honda", "ducati", "ford", "mazda","garage_renault_aie"]
const valid = ["train", "tv", "jewelry", "scooter", ...Object.values(replace), "watch", "oldtimer", "car", "bicycle", "boat", "windbreaker",
"agricultural", "alternator", "antiques", "atv", "auto",
"aviation maintenance", "bag", "bags",
"battery", "bicyle", "borehole", "building",
"camera", "car_glass", "caravan",
"carpenter", "coffee_machine", "construction machinery", "cycle",
"dentures", "ducati", "electric motor",
"electric_bike", "electric_scooter", "espresso_machines", "exhaust",
"fire_extinguishers", "fountain_pen", "fridge",
"garden_machinery", "gas appliances", "generator",
"glasses", "golfcart", "guitar",
"hammock", "hardware", "heating pumps",
"hifi", "hvac", "installation", "jewellery", "keys", "kick_scooter",
"kitesurfing", "tools", "toys", "tractor",
"trailer", "transformer", "truck",
"typewriter", "sail", "sewing_machine", "ship", "picture", "pillow", "plastic",
"cash_register", "cnc", "laptop",
"laundry_machines",
"photo_camera", "photocopier", "piano",
"power_tools", "pressure_gauges", "printer",
, "snowboard", "snowmobile", "starter", "machines", "mainframe",
"outboard_motor",
"video", "washing_machine", "ski", "radiator",
"radio", "refrigerator",
"rv", "ski", "window", "zipper", "weighing_scale",
"small_electric_vehicle"
].map(s => s.replace(/ /g, "_"))
const skip = ["yes", "no", "only", "brand", "assisted_self_repair", "only_sold"]
const dloader = new OsmObjectDownloader()
const rm = ["50243147100015", "81342677200048", "and overhaul", "repair", "unset", "сервисный_центр", "taller_de_michu", "quitandinha_g_&_a", "mechanika"].map(v => v.replace(/ /g, "_"))
const objects: OsmObject[] = []
const changesToMake: ChangeDescription [] = []
const first = GeoOperations.centerpointCoordinates(data[0])
for (const f of data) {
if (GeoOperations.distanceBetween(first, GeoOperations.centerpointCoordinates(f)) > 2500000) {
continue
}
let keyRaw = f.properties.repair
keyRaw = replace[keyRaw] ?? keyRaw
if (brands.some(br => keyRaw.toLowerCase().indexOf(br.trim()) >= 0)) {
f.properties.repair = "brand"
} if(skip.indexOf(keyRaw) >= 0){
f.properties.repair = keyRaw
} else {
const r = keyRaw.replace(/\/|,/g, ";").split(";").map(k => k.trim().replace(/ /g, "_").toLowerCase())
for (let key of r) {
key = replace[key] ?? key
if (rm.indexOf(key) >= 0) {
delete f.properties.repair
continue
}
f.properties[key + ":repair"] = "yes"
delete f.properties.repair
}
}
if (f.properties.service === "repair") {
delete f.properties.service
f.properties.repair = "yes"
}
const id = f.properties["id"]
const osm = await dloader.DownloadObjectAsync(id)
if (osm === "deleted") {
continue
}
objects.push(osm)
for (const key in f.properties) {
if (metakeys.indexOf(key) >= 0) {
continue
}
const value = f.properties[key]
const ct = await new ChangeTagAction(id, new Tag(key, value), f.properties, {
changeType: "fix",
theme: "script"
}).CreateChangeDescriptions()
changesToMake.push(...ct)
console.log(ct.map(cd => cd.tags))
if (f.properties.repair === undefined) {
const ct = await new ChangeTagAction(id, new Tag("repair", ""), f.properties, {
changeType: "fix",
theme: "script"
}).CreateChangeDescriptions()
changesToMake.push(...ct)
}
}
}
const
changedObjects = changes.CreateChangesetObjects(changesToMake, objects)
const
osc = Changes.createChangesetFor("", changedObjects)
writeFileSync(
"Cleanup.osc"
,
osc
,
"utf8"
)
}
}
new CleanRepair().run()

View file

@ -127,6 +127,7 @@ export default class Constants {
"clock",
"close",
"crosshair",
"gear",
"help",
"home",
"invalid",

View file

@ -366,9 +366,17 @@ export default class TagRenderingConfig {
throw `${ctx}: Invalid mapping: "if" is defined as an array. Use {"and": <your conditions>} or {"or": <your conditions>} instead`
}
if (mapping.addExtraTags !== undefined && multiAnswer) {
throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags; this is not allowed`
if(mapping.addExtraTags !== undefined && !Array.isArray(mapping.addExtraTags)){
throw `${ctx}.addExtraTags: expected a list, but got a ${typeof mapping.addExtraTags}`
}
if (mapping.addExtraTags !== undefined && multiAnswer) {
const usedKeys = mapping.addExtraTags?.flatMap(et => TagUtils.Tag(et).usedKeys())
if(usedKeys.some(key => TagUtils.Tag(mapping.if).usedKeys().indexOf(key ) > 0)){
throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags which also modifies one of the keys; this is not allowed`
}
}
let hideInAnswer: boolean | TagsFilter = false
if (typeof mapping.hideInAnswer === "boolean") {

View file

@ -36,6 +36,7 @@
import Bug from "../../assets/svg/Bug.svelte"
import Cross_bottom_right from "../../assets/svg/Cross_bottom_right.svelte"
import { Utils } from "../../Utils"
import Gear from "../../assets/svg/Gear.svelte"
/**
* Renders a single icon.
@ -126,6 +127,8 @@
<Cross_bottom_right {color} class={clss} />
{:else if icon === "addSmall"}
<AddSmall {color} class={clss} />
{:else if icon === "gear"}
<Gear {color} class={clss} />
{:else if icon === "link"}
<LinkIcon style="--svg-color: {color}" class={twMerge(clss, "apply-fill")} />
{:else if icon === "popout"}

View file

@ -278,9 +278,10 @@
<Tr t={Translations.t.general.backToIndex} />
</a>
</div>
<div>
<div class="flex justify-between">
<Checkbox selected={expertMode}>Enable more options (expert mode)</Checkbox>
<span class="subtle">MapComplete version {version}</span>
<div>{$uid}</div>
</div>
</div>
{:else if state === "edit_layer"}
@ -307,6 +308,7 @@
<ChooseLayerToEdit {osmConnection} layerIds={$selfLayers} on:layerSelected={editLayer}>
<h3 slot="title">Your layers</h3>
<div class="subtle">Your id is {$uid}</div>
</ChooseLayerToEdit>
<h3>Layers by other contributors</h3>
<div>

View file

@ -630,7 +630,13 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
for (const key in source) {
if (key.startsWith("=")) {
const trimmedKey = key.substr(1)
const trimmedKey = key.substring(1)
target[trimmedKey] = source[key]
continue
}
if (key.endsWith("=")) {
const trimmedKey = key.substring(0, key.length - 1)
target[trimmedKey] = source[key]
continue
}