naturalatlas / tilestrata

A pluggable Node.js map tile server.
Apache License 2.0
428 stars 42 forks source link

Compatibility with tilelive? #3

Open mojodna opened 9 years ago

mojodna commented 9 years ago

This looks excellent.

I've been working a rather similar piece of software for a while (tessera), presumably with slightly different requirements / philosophy (but also borne out of experience with TileStache).

tessera relies on tilelive modules for everything (as does its sibling, tl and I expect that we have very similar desires for future modules (I was about to embark on an ImageMagick module this morning before seeing tilestrata-gm). As such, it would be great to find a way to write adapters that map between tilelive and tilestrata modules so we can keep the core functionality centralized and shareable.

Thoughts?

brianreavis commented 9 years ago

@mojodna I considered tessera for awhile! I never really could wrap my head around configuration through URI's though (tilelive thing, not tessera), which is what my hangup was. Also, I couldn't totally figure out what tilelive was – and how caches, transforms, providers, etc could work together. It does have a great ecosystem though. Writing two adapters (tilestrata to tilelive and tilelive to tilestrata) wouldn't be that hard and don't see why not!

tilestrata-mapnik is an example of something using a tilelive module under the hood.

mojodna commented 9 years ago

Ah, yeah. That took a bit for me to wrap my head around as well, but I realized how powerfully composable the different pieces are, especially when rendering vector tiles, rendering them to images, and then transforming them.

Here's an example from the OpenTerrain project that applies some blend operations to the hillshades:

https://github.com/stamen/openterrain-map/blob/master/tessera.json

(These can be nested since everything is ultimately a source. https://github.com/stamen/sm2 is a Mapnik-powered version of the compositing tech behind Map Stack (which actually uses node-cairo under the hood and I haven't built a tilelive source for that yet).)

Good point re: "what is tilelive?" I've proposed talks about it in the past because I think it's a really powerful abstraction that's not well-understood, but that's never gone anywhere.

We should see to what extent we can converge our rendering stacks since we have pretty common needs.

tmcw commented 9 years ago

This is a really interesting thread: we (mapbox) haven't done nearly enough to document how tilelive parts fit together, despite that system being the backbone of tile serving. I'll try writing some docs and running them past @yhahn

brianreavis commented 9 years ago

@tmcw @yhahn Cool! I think different options in the space are good. As far as node tile servers go, we're not to the "paralyzed by choice" stage yet :) If you want someone naive to review, I'd be happy to help.