{ "name": "apply_dash_pattern", "type": "function", "groups": ["GeometryGroup"], "description": "Applies a dash pattern to a geometry, returning a MultiLineString geometry which is the input geometry stroked along each line/ring with the specified pattern.", "arguments": [{ "arg": "geometry", "description": "a geometry (accepts (multi)linestrings or (multi)polygons)." }, { "arg": "pattern", "description": "dash pattern, as an array of numbers representing dash and gap lengths. Must contain an even number of elements." }, { "arg": "start_rule", "optional": true, "default": "no_rule", "description": "optional rule for constraining the start of the pattern. Valid values are 'no_rule', 'full_dash', 'half_dash', 'full_gap', 'half_gap'." }, { "arg": "end_rule", "optional": true, "default": "no_rule", "description": "optional rule for constraining the end of the pattern. Valid values are 'no_rule', 'full_dash', 'half_dash', 'full_gap', 'half_gap'." }, { "arg": "adjustment", "optional": true, "default": "both", "description": "optional rule for specifying which part of patterns are adjusted to fit the desired pattern rules. Valid values are 'both', 'dash', 'gap'." }, { "arg": "pattern_offset", "optional": true, "default": "0", "description": "Optional distance specifying a specific distance along the pattern to commence at." }], "examples": [{ "expression": "geom_to_wkt(apply_dash_pattern(geom_from_wkt('LINESTRING(1 1, 10 1)'), array(3, 1)))", "returns": "MultiLineString ((1 1, 4 1),(5 1, 8 1),(9 1, 10 1, 10 1))" }, { "expression": "geom_to_wkt(apply_dash_pattern(geom_from_wkt('LINESTRING(1 1, 10 1)'), array(3, 1), start_rule:='half_dash'))", "returns": "MultiLineString ((1 1, 2.5 1),(3.5 1, 6.5 1),(7.5 1, 10 1, 10 1))" }], "tags": ["dash", "stroked", "multilinestring", "input", "ring", "specified", "applies", "line", "pattern", "returning"] }