Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clarify kind of version number #62

Open
bylee20 opened this issue Nov 26, 2019 · 4 comments
Open

Clarify kind of version number #62

bylee20 opened this issue Nov 26, 2019 · 4 comments

Comments

@bylee20
Copy link

bylee20 commented Nov 26, 2019

spec 1.3 tells:

  • version (number): The version of the tileset. This refers to a revision of the tileset itself, not of the MBTiles specification.

When seeing 'number' here, I thought an natural number 1, 2, 3, ... because usually, revision number is natural number.

Am I right? Or, does the 'number' mean a real number?

By the way, if you meant a real number, it could be confusing because the type of field is TEXT.

When one see 1.3 as a string, he or she may consider it as a semver style version "1.3.0" not a floating point number 1.3 (that is, 13/10).

This could result into wrong comparison. For instance, for real number, 1.3 > 1.15, but for semver, "1.15" > "1.3".

@bylee20 bylee20 changed the title kind of version number Clarify kind of version number Nov 26, 2019
@klokan
Copy link

klokan commented Apr 17, 2020

I am strongly for permitting under version the semver - e.g. 1.2.3.

This is used in https://OpenMapTiles.org/ vector tiles already.

The reason: the version can be then used for compatibility of style to a data schema version of tiles in a semantic version approach. If a GL style is compatible with a major version - it is guaranteed to not break the look&feel of the map.
This is the practical use-case - in place for all OpenMapTiles Open Styles - via the metadata header of the GL JSON Styles, for example at https://github.com/openmaptiles/klokantech-basic-gl-style/blob/master/style.json#L8 - which is checked against the semver from MBTiles version.

@pnorman
Copy link

pnorman commented Apr 21, 2020

The spec is pretty clear to me - it needs to be a number, which semver is not. If this change were desirable, would it have to go into 1.4 or 2.0?

@klokan
Copy link

klokan commented Apr 21, 2020

Thanks for jumping in @pnorman

It sounds to me that the value "3.11" is not breaking the spec, as it is a number - so technically the stored value in OpenMapTiles releases is correct.

@pnorman
Copy link

pnorman commented Apr 21, 2020

It sounds to me that the value "3.11" is not breaking the spec, as it is a number - so technically the stored value in OpenMapTiles releases is correct.

The spec doesn't define what a number is, but the example bounds which is numbers indicates "180.0" is a number.

But keep in mind 3.9 > 3.11 > 3.0 if you want to define your system's version as a floating point number.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants