I'm using Mapnik + Mapbox NodeJS stack. Given two vector tiles (PBFs) for the same location/zoom, with some layers having the same name in both. How do I merge them into one PBF tile - replacing identically named layers in the first tile with the ones from the second tile?

I found that I can add layers via GeoJSON, but it seems awfully inefficient: addGeoJSON does not replace existing layer, but adds a new one (even if the same name already exists), so I have to export each layer to JSON and re-add them to a new tile:

newVectorTile.addGeoJSON(vectorTile.toGeoJSON('water'), 'water');

1 Answer 1


2 years later but I've had some success doing what I think you want done using the tile-join tool in mapbox tippecanoe. It's opensource.


Tile-join is a tool for copying and merging vector mbtiles files and for joining new attributes from a CSV file to existing features in them.

It reads the tiles from an existing .mbtiles file or a directory of tiles, matches them against the records of the CSV (if one is specified), and writes out a new tileset.

If you specify multiple source mbtiles files or source directories of tiles, all the sources are read and their combined contents are written to the new mbtiles output. If they define the same layers or the same tiles, the layers or tiles are merged.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.