Skip to content
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

Mapzen MVT vector tiles #57

Closed
devemux86 opened this issue Jul 11, 2016 · 23 comments
Closed

Mapzen MVT vector tiles #57

devemux86 opened this issue Jul 11, 2016 · 23 comments
Milestone

Comments

@devemux86
Copy link
Collaborator

devemux86 commented Jul 11, 2016

Mapbox-format binary tiles uses the .mvt extension.

This is a compact format using protocol buffers that is used for raster tile rendering in TileMill2 and vector rendering in MapboxGL.

It is one of the available tile formats from Mapzen.

@mcbridet
Copy link

How hard would it be to modify the current VTM decoder for this format? VTM and MVT seem very similar but I would need to look into it a bit more. Was just asking in case you have already looked into this (or whether it was just a passing thought).

MapZen have deprecated VTM (though it is still accessible if you specify the API version as 0.8), but I have no doubt they will completely remove it soon.

@hjanetzek
Copy link

The MVT format hasn't changed that much. I got this decoder working with some minor tweaks a while ago: https://github.com/opensciencemap/vtm/blob/master/vtm-extras/src/org/oscim/tiling/source/mapnik/TileDecoder.java

Looking if I find the updated code again somewhere

@mcbridet
Copy link

Great, thanks! Looking on working on this some time in the near future just so I can continue using this library. :)

@devemux86
Copy link
Collaborator Author

devemux86 commented Oct 18, 2016

@deviousgeek I hadn't the time to check any of #55, #56 or #57...

@hjanetzek thanks for the info and any additional help!

@hjanetzek
Copy link

opensciencemap@ebecd34

./gradlew :vtm-desktop:run still seems to work :)

@mcbridet
Copy link

Definitely going to try this out when I get the chance, you rock. :)

@devemux86
Copy link
Collaborator Author

devemux86 commented Oct 18, 2016

Thanks @hjanetzek !

I played with it, probably theme(?) needs some work?
Less detail, no buildings, south Europe under water at zoom 9, etc.

(BTW I cannot find the new commit in opensciencemap history)

@mcbridet
Copy link

Yup, looks like I can only get greenery and bodies of water showing up using that theme file. I am sure it's just a matter of adapting the correct attributes in the theme file, however. :)

@mcbridet
Copy link

mcbridet commented Oct 19, 2016

For what it's worth, MapZen have posted a "cheat sheet" which they used to migrate to MVT internally.

https://gist.github.com/nvkelso/a7cfec649bb0de49f4ac71596a148a32

@devemux86
Copy link
Collaborator Author

devemux86 commented Oct 19, 2016

After upcoming VTM 0.6.0 release, I'll merge @hjanetzek 's commit so that's easier to work on it.

@hjanetzek
Copy link

hjanetzek commented Oct 19, 2016

@devemux86 yeah, this is unfinished code I had floating around. Please just pick the commit and cleanup (no need to merge the branch)

@andreynovikov
Copy link

Mapzen != Mapbox (IMHO)

@devemux86
Copy link
Collaborator Author

devemux86 commented Oct 20, 2016

@andreynovikov what do you mean?
Mapbox MVT as one of the available tile formats from Mapzen.

@andreynovikov
Copy link

Ah, ok. But mapbox format is from Mapbox, so it's better be referenced there.

@hjanetzek
Copy link

hjanetzek commented Oct 25, 2016

Everbody uses MVT format now (which is a slightly modified and rebranded OpenScienceMap VTM format IMHO :). Mapzen and Mapbox both offer vector tiles as MVT. The tiles use different tag schema for the contained data - so styling rules must be written for the respective schemas.
The statement of @deviousgeek was probably a bit misleading: The posted guide is for converting the styles written for the old Mapzen schema to the 1.0 tiles schema.

@devemux86
Copy link
Collaborator Author

devemux86 commented Oct 29, 2016

I pushed a series of commits for anyone wanting to work with .mvt tiles:

  • Merged @hjanetzek 's commit
  • Improvements and examples
  • Mapzen theme: SVG and improvements
  • Use new Mapzen production url

If we compare the default and the mapzen themes, they currently differ only in the water area!

@devemux86
Copy link
Collaborator Author

devemux86 commented Dec 17, 2016

For people asking how they could improve Mapzen MVT tiles parsing, I post some notes:

  • VTM infrastructure for .mvt tiles is ready and working (with base layers)
  • So need to modify the mapzen.xml theme
  • Tests can be done on Android with vtm-android-example and MapzenMvtMapActivity or on Desktop with vtm-playground and MapzenMvtTest
  • Important is to check what changes Mapzen has made to OSM tags (see above comments)

@devemux86 devemux86 changed the title Mapbox vector tiles Mapbox vector tiles (via Mapzen) Dec 19, 2016
@devemux86 devemux86 changed the title Mapbox vector tiles (via Mapzen) Mapbox (Mapzen) vector tiles Dec 19, 2016
@devemux86
Copy link
Collaborator Author

devemux86 commented Dec 29, 2016

Thanks to @boldtrn and PR #279 we now have a working Mapzen MVT implementation!
There are some things still to check:

  • kind=riverbank|dock rendering not working correctly (TODO)
  • All shops cannot appear as belong to generic kind tag (TODO)
  • Some artifacts at tile edges even in smaller zoom levels (see screenshot))
  • Can major cities appear in zoom < 8?

@boldtrn please report any other cases need checking.

artifacts

@devemux86
Copy link
Collaborator Author

devemux86 commented Dec 29, 2016

I added an option to select the preferred locale in Mapzen MVT vector tile source.

@boldtrn
Copy link

boldtrn commented Dec 29, 2016

Can major cities appear in zoom < 8?

Yes this is possible, see some samples here:

properties: {
kind: "locality",
name: "Lisbon",
source: "naturalearthdata.com",
min_zoom: 4,
country_capital: true,
id: 7131,
population: 2812000
}

properties: {
kind: "locality",
name: "Seville",
region_capital: true,
source: "naturalearthdata.com",
min_zoom: 5,
id: 6832,
population: 1212045
},

properties: {
kind: "locality",
name: "Dublin",
source: "naturalearthdata.com",
min_zoom: 4,
country_capital: true,
id: 7147,
population: 1059000
},

@devemux86
Copy link
Collaborator Author

A reference of layers in Mapzen's vector tiles is here.

@mcbridet
Copy link

This is fantastic news!

Can't wait to try this out.

@devemux86 devemux86 added this to the 0.7.0 milestone Jan 31, 2017
@devemux86
Copy link
Collaborator Author

devemux86 commented Jan 31, 2017

Closing this as Mapzen MVT vector tiles are now supported.

Issues can be followed separately, e.g. see #288 for the artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants