Clarify details in boundary layer
There are several issues with the documentation of the boundaries layer:
-
admin_levelproperty is defined asnumeric. I believe this should be clarified as unsigned integer (see also #31) - The feature table allows only
admin_level2 or 4. But in the description of thedisputedproperty it says "unset or between 2 and 4". Is it on purpose that level 3 is allowed here? That unset is allowed here? - The definition for the "disputed" property is hard to parse and with several
ands andors without braces, it is ambigous. - We should probably explain more clearly that processing for the boundaries layer has to look at both the tags of the ways and the relations and how they interact, especially for the
disputedcase.
I'm not sure it's possible to control the precise output type on all generation systems and someone may not have a choice between int, uint, and sint. If it comes to it I can just produce non-compliant tiles as any use-case won't depend on what the message type is.
Aside: The most efficient way to represent integers that could be negative is probably to pick the type based on the individual value, using uint for positive and sint for negative.
I think there are two separate issues with the numbers:
- What is the "natural data type" for this property, ie. the narrowest "usual" datatype that can store all values of this property. In this case this is "unsigned integer", but the definition is somewhat fuzzy, we could also say "a 4 bit unsigned integer is enough for this". But this is what we have to decide first.
- The next question is what detailed encoding to use specifically for vector tiles. This is informed by (1) and also the tools that exist etc.
I think for 1 this is really a case of we should be defining the allowable values. So admin_level is an integer between 2 and 8, layer is an integer between -5 and 5, etc.
planetilers' impl of this currently does ignore any admin_level not in [ 2, 4 ].
For the disputed case, I am therefore ignoring admin_level not in [ 2, 4 ] or unset, as we would not output this.
For the bracketing, I am implementing this like
Boundary line is either
Unsure if this is correct