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

Stream-list does not pass on info/metadata #125

Open
robpvn opened this issue Apr 17, 2015 · 3 comments
Open

Stream-list does not pass on info/metadata #125

robpvn opened this issue Apr 17, 2015 · 3 comments

Comments

@robpvn
Copy link
Contributor

robpvn commented Apr 17, 2015

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.

@robpvn
Copy link
Contributor Author

robpvn commented Apr 17, 2015

I looked at the MBTiles spec, and bounds are optional, so it seems one should be able to get away with snipping that out of the info object before passing it on. Same goes for center and maxzoom/minzoom, although I suspect that removing it might mess with some implementations expecting that metadata to be there? (As an aside, it looks like the mbtiles spec needs some updating to reflect current usage with vector tiles.)

@yhahn
Copy link
Member

yhahn commented Apr 18, 2015

but in my use case I'm copying a selection of vector tiles from a tmsource/mapnik XML

Hrm, usually we do this using scanline or pyramid with a min/maxzoom + bounds parameters. Is there a reason you're using a list stream for this?

@robpvn
Copy link
Contributor Author

robpvn commented Apr 18, 2015

I'm trying to generate tiles for a very non-rectangular area, Norway, so I wanted to skip processing lots of sea and Sweden/Finland. (Norway's bounding box in web-mercator is exceptionally wasteful!) I used tile-cover to generate a minimum list of tiles from a geojson outline, and then fed the list into the list stream. I'm of course open for alternate suggestions as to how best to accomplish this.

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

No branches or pull requests

2 participants