Skip to content
Discussion options

You must be logged in to vote
  • you can use martin's composite sources - e.g. --source landcover,place (I haven't personally tried it, but all the functionality is there to support it i think)
  • you can write a new PostGIS function that uses STRING_AGG to join the layers. Note the ORDER BY in a few places - to ensure the layer and feature ordering inside the tile is always predictable
SELECT STRING_AGG(mvtl, '' ORDER BY layer_ord) AS mvt
FROM (
    SELECT 0 AS layer_ord,
        COALESCE(ST_AsMvt(t, 'landcover', /* ... */ ORDER BY id), '') AS mvtl
    FROM (SELECT l.id
               , ST_AsMvtGeom(l.geom, z, x, y) AS geom
               ...
          FROM landcover_source l
          WHERE ...
          ) t

    UNION ALL

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@CommanderStorm
Comment options

@justb4
Comment options

@CommanderStorm
Comment options

@nyurik
Comment options

@justb4
Comment options

Answer selected by justb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants