Version 3 (modified by 2 years ago) ( diff ) | ,
---|
meta { title: "Mapillary Object Detections"; description: "Paint style for Mapillary point objects"; author: "Taylor Smock"; version: "1.6_2022-08-24"; icon: "mapillary-logo.svg"; } /*----------------------------------------------------------------------------*/ /* Pixel per metre (on average) */ /* Copied from Lane_and_Road_Attributes */ /*----------------------------------------------------------------------------*/ *|z16 { pixel_per_metre: 0.625; } *|z17 { pixel_per_metre: 1.25; } *|z18 { pixel_per_metre: 2.5; } *|z19 { pixel_per_metre: 5; } *|z20 { pixel_per_metre: 10; } *|z21 { pixel_per_metre: 20; } *|z22 { pixel_per_metre: 40; } *|z23 { pixel_per_metre: 80; } *|z24 { pixel_per_metre: 160; } *|z25 { pixel_per_metre: 320; } *|z26- { pixel_per_metre: 640; } setting::show_accuracy_circles { type: boolean; label: tr("Toggle accuracy circles"); default: false; } setting::show_detection_value { type: boolean; label: tr("Show detection values for detections with no known specific image"); default: true; } setting::hide_detections_with_no_known_image { type: boolean; label: tr("Hide detections with no known image"); default: true; } node|z20-[setting("show_accuracy_circles")][accuracy > 10]::mapillary_object_layer { symbol-shape: circle; symbol-size: 2 * tag("accuracy") * prop(pixel_per_metre, "default" ); symbol-fill-opacity: 0.2; symbol-fill-color: orange; symbol-stroke-color: orange; } node|z20-[setting("show_accuracy_circles")][accuracy <= 10][accuracy > 5]::mapillary_object_layer { symbol-shape: circle; symbol-size: 2 * tag("accuracy") * prop(pixel_per_metre, "default" ); symbol-fill-opacity: 0.2; symbol-fill-color: yellow; symbol-stroke-color: yellow; } node|z20-[setting("show_accuracy_circles")][accuracy <= 5]::mapillary_object_layer { symbol-shape: circle; symbol-size: 2 * tag("accuracy") * prop(pixel_per_metre, "default" ); symbol-fill-opacity: 0.2; symbol-fill-color: green; symbol-stroke-color: green; } node[layer=traffic_sign][value!~/^(object--traffic-(sign|light)--(|direction-|general-upright-|pedestrians-)(front|back|side))$/] { imagepath: "package_signs"; } node[layer=point] { imagepath: "package_objects"; } /* Avoid trying to show images for detections when the image does not exist */ node[value=general--traffic-sign--g1], node[value=complementary--texts-three-lines--g1], node[value=complementary--texts-two-lines--g1], node[value=information--general-directions--g1], node[value=marking--discrete--symbol--wheelchair], node[value=marking--discrete--text--other], node[value=marking--discrete--text--stop], node[value=object--sign--back], node[value=object--sign--other], node[value=object--traffic-light--cyclists-front], node[value=object--traffic-light--general-horizontal-back], node[value=object--traffic-light--general-horizontal-front], node[value=object--traffic-light--general-single-front], node[value=object--traffic-light--general-upright-back], node[value=object--traffic-light--general-upright-front], node[value=object--traffic-light--general-upright-side], node[value=object--traffic-light--pedestrians-back], node[value=object--traffic-light--pedestrians-front], node[value=object--traffic-light--pedestrians-side], node[value=object--traffic-sign--back], node[value=object--traffic-sign--back], node[value=object--traffic-sign--direction-back], node[value=object--traffic-sign--direction-front], node[value=object--traffic-sign--front], node[value=object--traffic-sign--information-parking], node[value=object--traffic-sign--temporary-back], node[value=object--traffic-sign--temporary-front], node[value=regulatory--texts-four-lines--g1], node[value=regulatory--texts-one-line--g1], node[value=regulatory--texts-three-lines--g1], node[value=regulatory--texts-two-lines--g1] { noimage: true; } node|z18-[value][is_prop_set(imagepath)][!is_prop_set(noimage)] { icon-image: concat(prop(imagepath), "/", tag("value")); } node|z18-[value][is_prop_set(noimage)] { symbol-shape: square; symbol-fill-color: white; symbol-size: 16; } node|z20-[value][is_prop_set(noimage)][setting("show_detection_value")], node|z24-[value][setting("show_detection_value")] { text: value; } node[layer=~/trafficsigns|points/]:selected::selected_layer { symbol-shape: square; symbol-size: +4; symbol-stroke-color: red; symbol-stroke-opacity: 0.7; }
Styles_MapillaryDetections-style.mapcss, Styles_MapillaryDetections.zip
Attachments (2)
- mapillary-logo.svg (871 bytes ) - added by 2 years ago.
-
mapillary_sprite_source.zip
(4.5 MB
) - added by 2 years ago.
(EXTRACT) icons from https://github.com/mapillary/mapillary_sprite_source/
Note:
See TracWiki
for help on using the wiki.