forked from MapComplete/MapComplete
179 lines
No EOL
4.9 KiB
JSON
179 lines
No EOL
4.9 KiB
JSON
{
|
|
"id": "zhv",
|
|
"title": {
|
|
"en": "ZHV Import Tool"
|
|
},
|
|
"description": {
|
|
"en": "Small theme allowing import of bus stops from the Zentrales Haltestellenverzeichnis in Germany."
|
|
},
|
|
"icon": "./assets/layers/transit_stops/bus_stop.svg",
|
|
"hideFromOverview": true,
|
|
"layers": [
|
|
{
|
|
"id": "zhv",
|
|
"name": {
|
|
"en": "Bus stops in ZHV"
|
|
},
|
|
"title": {
|
|
"render": {
|
|
"en": "Bus stop in ZHV"
|
|
}
|
|
},
|
|
"minzoom": 15,
|
|
"source": {
|
|
"geoJson": "https://robinlinde.github.io/tiles/zhv_haltestellen/{z}/{x}/{y}.json",
|
|
"geoJsonZoomLevel": 15,
|
|
"osmTags": "Type~Q"
|
|
},
|
|
"tagRenderings": [
|
|
{
|
|
"id": "name",
|
|
"render": {
|
|
"en": "This stop is called {Name}"
|
|
}
|
|
},
|
|
{
|
|
"id": "id",
|
|
"render": {
|
|
"en": "The ID of this stop is {_ifopt}"
|
|
}
|
|
},
|
|
{
|
|
"id": "closest_stop",
|
|
"render": {
|
|
"en": "The closest stop in OSM is <a href=#{_closest_osm_stop}>{_closest_osm_stop_name}</a>."
|
|
}
|
|
},
|
|
{
|
|
"id": "import",
|
|
"render": {
|
|
"special": {
|
|
"type": "import_button",
|
|
"targetLayer": "transit_stops",
|
|
"tags": "_tags",
|
|
"text": {
|
|
"en": "Add this stop"
|
|
}
|
|
}
|
|
},
|
|
"condition": {
|
|
"or": [
|
|
"_has_closeby_feature=no",
|
|
"_has_closeby_feature=maybe"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "tag-hint",
|
|
"render": {
|
|
"en": "This stop will get the following tags: <b>{_tags}</b>"
|
|
},
|
|
"condition": {
|
|
"or": [
|
|
"_has_closeby_feature=no",
|
|
"_has_closeby_feature=maybe"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "imported",
|
|
"render": {
|
|
"en": "This stop is (probably) already added. <a href=#{_closest_osm_stop_id}>View the point</a>."
|
|
},
|
|
"condition": {
|
|
"or": [
|
|
"_has_closeby_feature=yes",
|
|
"_has_closeby_feature=maybe"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "tag-apply",
|
|
"condition": {
|
|
"or": [
|
|
"_has_closeby_feature=yes",
|
|
"_has_closeby_feature=maybe"
|
|
]
|
|
},
|
|
"render": {
|
|
"special": {
|
|
"type": "tag_apply",
|
|
"tags_to_apply": "ref:IFOPT=$_ifopt",
|
|
"id_of_object_to_apply_this_one": "_closest_osm_stop_id",
|
|
"message": {
|
|
"en": "Add IFOPT to the existing stop"
|
|
},
|
|
"image": "./assets/svg/addSmall.svg"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "minimap_with_poi",
|
|
"render": "{minimap(18, id, _closest_osm_stop_id)}"
|
|
}
|
|
],
|
|
"pointRendering": [
|
|
{
|
|
"marker": [
|
|
{
|
|
"icon": "circle",
|
|
"color": {
|
|
"render": "red",
|
|
"mappings": [
|
|
{
|
|
"if": "_has_closeby_feature=yes",
|
|
"then": "green"
|
|
},
|
|
{
|
|
"if": "_has_closeby_feature=maybe",
|
|
"then": "orange"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"location": [
|
|
"point",
|
|
"centroid"
|
|
],
|
|
"iconSize": "20,20"
|
|
}
|
|
],
|
|
"calculatedTags": [
|
|
"_closest_osm_stop=closest(feat)('transit_stops')?.properties",
|
|
"_closest_osm_stop_id=feat.properties._closest_osm_stop?.id",
|
|
"_closest_osm_stop_distance=distanceTo(feat)(feat.properties._closest_osm_stop_id)",
|
|
"_closest_osm_stop_name=feat.properties._closest_osm_stop?.name",
|
|
"_has_closeby_feature=feat.properties._closest_osm_stop_distance < 15 ? 'yes' : (feat.properties._closest_osm_stop_distance > 25 ? 'no' : 'maybe')",
|
|
"_ifopt=feat.properties.DHID",
|
|
"_tags='highway=bus_stop;public_transport=platform;ref:IFOPT='+feat.properties._ifopt+';name='+feat.properties.Name"
|
|
]
|
|
},
|
|
{
|
|
"builtin": "transit_stops",
|
|
"override": {
|
|
"name": {
|
|
"en": "Bus stops in OSM"
|
|
},
|
|
"tagRenderings+": [
|
|
{
|
|
"id": "ifopt",
|
|
"question": {
|
|
"en": "What is the IFOPT reference of this stop?"
|
|
},
|
|
"render": {
|
|
"en": "The IFOPT reference of this stop is {ref:IFOPT}."
|
|
},
|
|
"freeform": {
|
|
"key": "ref:IFOPT",
|
|
"type": "string",
|
|
"placeholder": {
|
|
"en": "e.g. NL:Q:15003950 or de:03457:15801::2"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |