-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0 spec #46
base: master
Are you sure you want to change the base?
2.0 spec #46
Conversation
This allows compression to be applied on top of tile data, which is an advantage for some tile types.
I like that you included |
Some comments:
|
I was trying to preserve compatibility with
2.0 makes it clear that it is a container format that can store any tiled data, which is not possible on 1.x. Does this require modifications to the prose or
Well, support for any vector data sources.
Right now the spec places no requirements on implementations, just on the mbtiles files. I see the role of mbtiles here similar to that of .tar - it defines a way to store content/files, and it's up to something else to make use of that content. I agree that right now any implementation is likely to have the same support for png and jpg and the situation will change with arbitrary types, so I'll try to come up with appropriate wording that makes it clear there's no requirement on what readers do with the contained tile data. fwiw, this is theoretically possible in 1.2 if you had a reader that supported jpeg but not png. |
Any data format is allowed, it's just a question of describing it. |
One thing to make note of is that the MIME type of MVT is I'd say we really do not want to break backwards compatibility with the 1.x specs. Part of the motivation to continue using MBTiles is that it has been a well known format for 5+ years. |
You register MIME types, but it's easy. See mapbox/vector-tile-spec#48 for background. I'm talking to some people about doing this for OSM types.
Is there much software which relies on png/jpg to know what to do with tile data? |
Looking at Mapbox Android SDK Legacy (DEPRECATED), it looks like the MBTiles support doesn't look at Looking at WhirlyGlobe-Maply (Android), it looks like it does the same thing. However, WhirlyGlobe does check to see if it is However, that is referencing the Android implementation. The iOS implementation can handle either, because under the hood, it uses Another good one would be Nutiteq, though I don't have access to the source. For the Android, my best guess would be that they do the same thing and only support PNG. Phew! So, I think the answer would be: no. The implementation either assumes it's PNG or discerns if it is PNG or JPG from the data itself. |
That means that we can break backwards compatibility but there is a subset of 2.0 tilesets which will work the same on most 1.2 readers. I'm surprised by the lack of JPEG support, are there not many JPEG tilesets in the wild? |
From my experience, it's always been PNG unless MapQuest made it. I think Mapbox does JPG too, but people usually use the PNG endpoints? |
The main reason for this is that PNG is a better format for maps unless you have hillshading, imagery, or some other raster data. I'll edit to use MIME type if we think this is acceptable. For OSM MIME types, I'm going to be starting a discussion on registering them - some details still need working out. |
The roadmap has "The format will switch tile ordering to the XYZ schema popularized by OpenStreetMap and away from the Tile Map Service specification." Do we want to do this in 2.0, put it off to a later version, or drop it from the roadmap? |
fwiw, I'm in favour of dropping it. The conversion between the two is technically trivial and I think the pain from breaking compatibility in this way is worse than any potential gains. |
👍 . Support for Google TMS would just make things more confusing. Perhaps give this hint in the spec: y = (1 << z) - 1 - y; |
Couple of changes following some gitter discussion and the discussion here
Remaining issues
|
BTW, I had failed to see this PR and just made my own attempt (#47) to document the current de facto standard for mbtiles, which I should now attempt to reconcile with these changes. |
I think the only changes left are informative ones to the prose of the text to make some aspects clearer. Does anyone see anything else? |
@pnorman I know I am very late to this, but I would suggest (based on what I did in #47):
|
I view indexes as an implantation detail because views are allowed, they don't need to be tables. More on other comments when I get home. |
I could see grandfathering jpg and png, but never pbf which no conformant mbtiles implementations would have produced. pbf also has the problem that there's lots of different pbf encodings for geodata.
I looked at it, and I'm 👎 on using it because it puts lots of format-specific data into the spec, and does so in the wrong way. If we wanted to add additional information we should do so with additional metadata keys or additional tables. |
@pnorman I'm ok with putting the |
I am happy with the state of the PR, although another pass of copyediting would be welcome. |
What else needs doing here? |
Thank you for working on this .. It is possible to modify the spec to
|
Yes, I can fix this to be non-discriminatory. The encoding of strings is part of sqlite, and not something that belongs here, and I don't even think you have a good way to see what the encoding is. |
I believe all outstanding issues are solved. Do the maintainers see anything else that needs changing? |
I support the suggestion by @ericfischer that version could do with clarification. "Version of the mbtiles spec? Revision of the tileset itself? Something else?" |
Pinging @flippmoke on this, since he said mapbox is resuming work on mbtiles |
/cc @ericfischer |
ping @ericfischer |
After some discussion with @ericfischer and @springmeyer on this issue last week we have decided to hold off on this until after #47 is complete. Our initial goal is to have the spec represent what is currently existing in the wild and then from there work towards how we want the spec to actually be. I believe this PR has a lot of potential in it for the next version If there are elements of this PR that should be moved into That being said, I am somewhat concerned about the rebase of this branch after we update to |
That's the goal with this 2.0 work too. Anything in the wild should work with it. The
14942c6...pnorman:2.0 is the best thing to look at. Off hand, I'd add
The git side is easy, because they're all different documents. The problem is applying any changes made in 1.3 to this. I still feel the 2.0 route is a better one to go with. In any case, I do not expect to allocate any time to it, because I mentally gave up on the mbtiles and tilejson specs a few months ago |
Fixes #43
Fixes #44
Fixes #31
Fixes #28
Closes #47 (imo)
This is a draft of a 2.0 spec which addresses tile formats and compression.
Unaddressed are spec versioning (#3),
tileset versioning (#31), and tileset type (#28)since no decision was made on if those changes should be accepted or not.For a diff of 1.2 to 2.0, see 14942c6...pnorman:2.0
CC @hallahan @blair1618 @systemed