shortbread-tiles / shortbread-docs

Documentation of the Shortbread vector tile schema
https://shortbread-tiles.org
Creative Commons Zero v1.0 Universal
25 stars 7 forks source link

Clarify details in boundary layer #43

Open joto opened 5 months ago

joto commented 5 months ago

There are several issues with the documentation of the boundaries layer:

  1. admin_level property is defined as numeric. I believe this should be clarified as unsigned integer (see also #31)
  2. The feature table allows only admin_level 2 or 4. But in the description of the disputed property it says "unset or between 2 and 4". Is it on purpose that level 3 is allowed here? That unset is allowed here?
  3. The definition for the "disputed" property is hard to parse and with several ands and ors without braces, it is ambigous.
  4. 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 disputed case.
pnorman commented 5 months ago

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.

joto commented 5 months ago

I think there are two separate issues with the numbers:

  1. 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.
  2. 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.
pnorman commented 5 months ago

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.