OpenStreetMap

Princi Vershwal's diary

Recent diary entries

Vector Tiles for iD Editor : Playing with mvt and pbf files.

Posted by Princi Vershwal on 12 June 2018 in English (English)

Hello Human!!

I am working on my GSoC project, that is providing support for vector tiled data in OSM iD editor, for about a month now. Initially, there was a lot of reading about how the map is rendered on a screen from geojson data, how are raster tiles and vector tiles different, various formats of vector tiles and much more!!

First step in the project

The first step towards supporting vector tiled data is that a user can add a URL to a vector tile and have the vector tile shown up on the screen. Currently, it will support .pbf(Protocolbuffer Binary Format) and .mvt(Mapbox Vector Tiles) format. For those who are new to vector tiles, .mvt and .pbf contain data of a particular tile. They look something like this : MVT These tiles can have various sets of data like name of cities, or train stations etc. The goal is to draw the data of these tile on iD and it should show up on the screen like this : iD

These files contain data in Protocolbuffer binary format which is converted to geojson data and this geojson data is passed directly to the D3 draw functions to show up the tiles on the screen.

For converting vector tile data to geojson data, mapbox provides : 1. vt2geojson 2. vector-tile-js

vt2geojson is great for changing vector tiles to GeoJSON from remote URLs or local system files but it works with Node.js only. For iD we'll be using mapbox's vector-tile-js, it read Mapbox Vector Tiles and allows access to the layers and features, these features can be further converted to geojson.

All the code related to this will be here, for more discussion, you can follow here.

The next step would be working towards .mbtiles, these files contain data for more than one tile.

Cheers!!

Location: Roorkee, Haridwar, Uttarakhand, 247667, India

Vector Tiles for iD Editor

Posted by Princi Vershwal on 28 April 2018 in English (English)

Hello OSM community!!

I'm a final year undergrad at IIT Roorkee, India. I have been accepted to Google Summer of Code 2018. This summers I'll be working on providing support for vector tiled data for iD editor. Here are more details about the project.

I'll be posting most of the updates on the project work here. I am looking forward to making it a great learning experience so I would highly appreciate your suggestions.

Cheers!!

Location: Roorkee, Haridwar, Uttarakhand, 247667, India