tangram icon indicating copy to clipboard operation
tangram copied to clipboard

"geometry clipping" of data sources

Open meetar opened this issue 8 years ago • 1 comments

Would it be possible to allow datasources to be "clipped" by a shape or boundary? Eg: to allow a user to use one datasource inside a given boundary and another datasource outside of it.

I imagine this would most commonly look like: custom/proprietary data inside a boundary, and our OSM-derived vector tiles outside of it.

meetar avatar Oct 24 '16 18:10 meetar

I think a simple version of what you are describing is implemented in this branch:

https://github.com/tangrams/tangram/compare/fallback-source

The idea here was that a given data source might only have partial tile coverage, and when it hit a 404, it would fallback to another data source (probably the canonical Mapzen one).

We had an inquiry from a potential user about this, so I tried that out as an experiment. It's viable and the logic is simple, but was waiting for further discussion around use cases before adding to a release. My inclination would be do something simple/coarse like this (one could apply a source bounds to clip, for instance) rather than supporting something like an arbitrary polygon clip (which would add considerable complexity vs. piggybacking on something we have).

bcamper avatar Oct 24 '16 18:10 bcamper