mapbox / mapbox/mbtiles-spec

Update vector_layers to match tilejson-spec 3.0

Open
#53 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
671
Forks
100
PR merge metrics
No merged PRs in 30d

Description

The TileJSON specification v3.0 will be released soon - this version documents the de factor requirements for `vector_layers` by adapting the text from 1.3 of this specification.

A key difference is that the TileJSON specification does not require `field` values to be explicitly `Number`, `String`, or `Boolean` and suggests it should just be a string that describes the attribute. Here is what the mbtiles specification says:

> `fields` (object): A JSON object whose keys and values are the names and types of attributes available in this layer. Each type MUST be the string "Number", "Boolean", or "String". Attributes whose type varies between features SHOULD be listed as "String".

And the tilejson-spec 3.0 proposes the following:

> `fields` (object): A JSON object whose keys and values are the names and descriptions of attributes available in this layer. Each value (description) MUST be a string. The values MAY describe the underlying data type, such as "String", "Number", or "Boolean". Attributes whose type varies between features MAY be listed as "String".

The current mbtiles-spec will continue to be valid once 3.0 is released with this description (since they are strings), but the requirements are unnecessarily strict. In general, the mbtiles-specification is driven by _encoders_, so the current requirement is likely driven by the inability for computers to put together implicit descriptions other than determining the data type.

Once tilejson-spec is released, can we update the mbtiles-spec to be more relaxed and point to this description of "vector_layers" as the source of truth?

cc @ericfischer @GretaCB @flippmoke

Contributor guide

Open the contributing guide

Research direction

Start by locating the current vector_layers and fields wording in the mbtiles-spec documents, then compare it with the TileJSON specification 3.0 description quoted in the issue. Done means the fields requirement is relaxed to allow string descriptions and the specification points to TileJSON 3.0 as the source of truth.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.