Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serving multi-layer tiles from PostGIS #1538

Open
superrache opened this issue Oct 9, 2024 · 0 comments
Open

Serving multi-layer tiles from PostGIS #1538

superrache opened this issue Oct 9, 2024 · 0 comments

Comments

@superrache
Copy link

superrache commented Oct 9, 2024

Declaring multiple PostGIS layer tables in the configuration file makes Martin to serve multiple tiles (one tile service by layer). It would be useful to be able to declare all the layers in a same tile service.

Actual config file:

...
postgres:
  ...
  auto_published: false
  tables:
    buildings:
      layer_id: buildings
      schema: public
      table: buildings
      srid: 3857
      geometry_column: geom
      id_column: ~
      minzoom: 14
      maxzoom: 14
      bounds: [ -180.0, -90.0, 180.0, 90.0 ]
      extent: 4096
      buffer: 64
      clip_geom: true
      geometry_type: POLYGON
      properties:
        area_id: int4
    boundaries:
      layer_id: boundaries
      schema: public
      table: boundaries
      srid: 3857
      geometry_column: geom
      id_column: ~
      minzoom: 2
      maxzoom: 14
      bounds: [ -180.0, -90.0, 180.0, 90.0 ]
      extent: 4096
      buffer: 64
      clip_geom: true
      geometry_type: LINESTRING
      properties:
        way_id: int4
        admin_level: integer
        maritime: string
        disputed: string

What is generated in the /catalog:

{
    "tiles": {
        "boundaries": {
            "content_type": "application/x-protobuf",
            "description": "public.boundaries.geom"
        },
        "buildings": {
            "content_type": "application/x-protobuf",
            "description": "public.buildings.geom"
        }
    }
}

And in the boundaries TileJSON, only one vector_layers:

{
    "tilejson": "3.0.0",
    "tiles": [
        "http://localhost:3000/boundaries/{z}/{x}/{y}"
    ],
    "vector_layers": [
        {
            "id": "boundaries",
            "fields": {
                "admin_level": "integer",
                "disputed": "string",
                "maritime": "string",
                "way_id": "int4"
            }
        }
    ],
    "bounds": [-180, -90, 180, 90],
    "description": "public.boundaries.geom",
    "maxzoom": 14,
    "minzoom": 2,
    "name": "boundaries"
}

It would be useful to declare a MVT service "all" containing both "boundaries" and "buildings" in vector_layers.

Maybe it's possible but didn't find how to do that in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant