Refactoring: use more accurate context in conversion, fix tests

This commit is contained in:
Pieter Vander Vennet 2023-10-12 16:55:26 +02:00
parent 86d0de3806
commit f77d99f8ed
43 changed files with 999 additions and 367 deletions

View file

@ -4721,6 +4721,77 @@
}
}
],
"lineRendering": [],
"pointRendering": [
{
"location": [
"point",
"centroid"
],
"marker": [
{
"icon": "pin",
"color": "#fff"
},
{
"icon": {
"render": "./assets/themes/charging_stations/plug.svg",
"mappings": [
{
"if": "bicycle=yes",
"then": "./assets/themes/charging_stations/bicycle.svg"
},
{
"if": {
"or": [
"car=yes",
"motorcar=yes"
]
},
"then": "./assets/themes/charging_stations/car.svg"
}
]
}
}
],
"iconBadges": [
{
"if": {
"or": [
"disused:amenity=charging_station",
"operational_status=broken"
]
},
"then": "close:#c22;"
},
{
"if": {
"or": [
"proposed:amenity=charging_station",
"planned:amenity=charging_station"
]
},
"then": "./assets/layers/charging_station/under_construction.svg"
},
{
"if": {
"and": [
"bicycle=yes",
{
"or": [
"motorcar=yes",
"car=yes"
]
}
]
},
"then": "circle:#fff;./assets/themes/charging_stations/car.svg"
}
],
"anchor": "bottom",
"iconSize": "50,50"
}
],
"presets": [
{
"tags": [
@ -5272,40 +5343,5 @@
]
},
"neededChangesets": 10
},
"pointRendering": [
{
"location": [
"point",
"centroid"
],
"marker": [
{
"icon": "pin",
"color": "#fff"
},
{
"icon": {
"render": "./assets/themes/charging_stations/plug.svg",
"mappings": [
{
"if": "bicycle=yes",
"then": "./assets/themes/charging_stations/bicycle.svg"
},
{
"if": {
"or": [
"car=yes",
"motorcar=yes"
]
},
"then": "./assets/themes/charging_stations/car.svg"
}
]
}
}
]
}
],
"lineRendering": []
}
}
}

View file

@ -48,5 +48,6 @@
],
"tagRenderings": [
"images"
]
],
"name": "Guideposts"
}

View file

@ -19,4 +19,4 @@
"https://wiki.openstreetmap.org/wiki/File:Signpost.jpg"
]
}
]
]

View file

@ -657,7 +657,7 @@
"nl": "Verkoop van bloemen",
"de": "Verkauf von Blumen",
"fr": "Vente de fleurs",
"ca": "Venda d'aparcament"
"ca": "Venda de flors"
},
"osmTags": "vending~i~.*flowers.*"
},

View file

@ -126,7 +126,9 @@
"point",
"centroid"
]
},
}
],
"lineRendering": [
{
"width": {
"render": 1
@ -306,9 +308,29 @@
"render": "The current function of the building is <b>{gebruiksdoel}</b>"
}
],
"pointRendering": [],
"pointRendering": [
{
"label": {
"render": "<div style='color: black' class='rounded-full p-1 font-bold relative'>{_bag_obj:addr:housenumber}</div>",
"mappings": [
{
"if": "_imported_osm_object_found=true",
"then": "<div style='color: #107c10' class='rounded-full p-1 font-bold relative'>{_bag_obj:addr:housenumber}</div>"
}
]
},
"location": [
"point",
"centroid"
]
}
],
"lineRendering": [
{}
{
"width": {
"render": 1
}
}
]
},
{
@ -345,9 +367,29 @@
"render": "{openbare_ruimte} {_bag_obj:addr:housenumber}, {woonplaats} {postcode}"
}
],
"pointRendering": [],
"pointRendering": [
{
"label": {
"render": "<div style='color: black' class='rounded-full p-1 font-bold relative'>{_bag_obj:addr:housenumber}</div>",
"mappings": [
{
"if": "_imported_osm_object_found=true",
"then": "<div style='color: #107c10' class='rounded-full p-1 font-bold relative'>{_bag_obj:addr:housenumber}</div>"
}
]
},
"location": [
"point",
"centroid"
]
}
],
"lineRendering": [
{}
{
"width": {
"render": 1
}
}
]
}
],

View file

@ -469,9 +469,11 @@
],
"override": {
"minzoom": 15,
"mapRendering": [{
"iconSize": "30,30"
}]
"mapRendering": [
{
"iconSize": "30,30"
}
]
}
}
],

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="250"
height="250"
viewBox="0 0 250 250"
width="500"
height="500"
viewBox="0 0 500 500"
fill="none"
version="1.1"
id="svg16"
sodipodi:docname="penny.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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"
@ -25,17 +25,18 @@
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="1.5733333"
inkscape:cx="125.52966"
inkscape:cy="75"
inkscape:cx="275.84746"
inkscape:cy="284.42797"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg16" />
inkscape:current-layer="svg16"
inkscape:pageshadow="0" />
<g
id="g310"
transform="translate(0,50)">
transform="matrix(1.9997517,0,0,1.9997517,0,99.370201)">
<path
d="m 246,75 c 0,18.7536 -12.69,36.415 -34.67,49.603 C 189.43,137.743 158.917,146 125,146 91.0825,146 60.5697,137.743 38.6696,124.603 16.69,111.415 4,93.7536 4,75 4,56.2464 16.69,38.5848 38.6696,25.397 60.5697,12.2569 91.0825,4 125,4 158.917,4 189.43,12.2569 211.33,25.397 233.31,38.5848 246,56.2464 246,75 Z"
fill="#ff8c4e"

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before After
Before After