You are not logged in.

#1 2020-06-23 23:26:43

cul-de-sac
Member
Registered: 2019-03-18
Posts: 4

maperitive and multiple values

hi

I created a ruleset for drawing borders.

In the features section I have for example the following rule:

features
	lines
		boundary borough : boundary=administrative AND admin_level=9

This works fine, but then I discovered that sometimes keys have multiple values. For instance I found ways in OSM that are tagged like this:

boundary=administrative;postal_code

In this case, the above rule in the features section doesn't match and parts of the boundary are not rendered. I changed my ruleset to this:

features
	lines
		boundary borough : (boundary=administrative OR boundary="administrative;postal_code") AND admin_level=9

This works, but only for this specific combination.

Any better solution available?

For example, can I use regular expressions in the features section?

		boundary borough : boundary=~$regex("(.*;)?administrative(;.*)?") AND admin_level=9

The above code does not work, the =~ operator was just a guess of mine.

Regards
cul-de-sac

Offline

Board footer

Powered by FluxBB