Skip to content

SQL fragments in tilset.json? #279

Answered by bchapuis
b4l asked this question in Q&A
Discussion options

You must be logged in to vote

The queries for creating complex vector tiles can become quite complex (see the example below). The simple SQL queries stored in the TileJSON files allow the cartographer to focus on the content of the layers. Baremaps parses these queries, merges their ASTs and produces a single query with CTEs that hits the database. Therefore, the complexity associated with the creation of such optimized queries is left to the engine and the cartographer can preserve his sanity.

with hfabbbbce as (select *
                   from osm_nodes
                   where ((tags ? 'aeroway') OR (tags ? 'waterway') OR (tags ? 'landuse') OR (tags ? 'railway') OR
                          (tags ? 'highway') OR (t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bchapuis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants