mapbox / mapbox/tilelive

Stream-list does not pass on info/metadata

Open
#125 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
540
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Stream-list.js does not seem to preserve info/metadata like stream-scanline does. Scanline calls getInfo on the source to get the source's parameters and then pushes them onto the stream, preserving metadata. But Stream-list does not handle info at all (except for a require('Info') at the start which is then not used again), so outputs produced using streamlist have no metadata.

Is this intentional or an omission? I can see that copying all of the metadata from an original (including bounds info) when you use stream-list to only grab a portion of the tiles wouldn't be quite correct, but in my use case I'm copying a selection of vector tiles from a tmsource/mapnik XML and need to have the vector_layers json in the resulting mbtiles file in order for it to be useable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare Stream-list.js with stream-scanline, especially the getInfo call and the unused require('Info'). Check how metadata is written to the resulting MBTiles output, using vector_layers JSON as the concrete case. Done means stream-list preserves the metadata needed by copied vector tiles without blindly retaining invalid bounds information.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.