WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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

justb4 Aug 28, 2025
Author Sponsor

@CommanderStorm
Comment options

@nyurik
Comment options

@justb4
Comment options

justb4 Aug 29, 2025
Author Sponsor

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