EPFL-ENAC / enacit4r-tiles

ENACIT4Research Tile server
https://enacit4r-tiles.epfl.ch/
MIT License
0 stars 0 forks source link

ENACIT4Research Tiles

ENACIT4Research tile server using Martin.

Operation

  1. Setup environment variables

  2. Build images and start services

make run
  1. Stop services with:
make stop
  1. Access to Martin's catalog

When running locally:

curl http://localhost:3000/catalog | jq

Or on the deployed instance:

curl https://enacit4r-tiles.epfl.ch/catalog | jq
  1. Refresh Martin's catalog

Martin does not automatically refresh its catalog, then after new layers have been added to the database, restart the Martin's service:

make refresh-catalog

Integration in MapLibre

  1. Get layer IDs

Visit enacit4r-tiles.epfl.ch/catalog to find your layer IDs.

  1. Declare source(s)

Declare one source per table of geometries:

  "sources": {
    "landuse_abiotic": {
      "type": "vector",
      "url": "https://enacit4r-tiles.epfl.ch/LandUse_Sg_Sel_2020_abiotic"
    },
    "landuse_biotic": {
      "type": "vector",
      "url": "https://enacit4r-tiles.epfl.ch/LandUse_Sg_Sel_2020_biotic"
    }
  }

Or use composite sources (note: use composite sources with caution as it affects processing performance):

  "sources": {
    "landuse": {
      "type": "vector",
      "url": "https://enacit4r-tiles.epfl.ch/LandUse_Sg_Sel_2020_abiotic,LandUse_Sg_Sel_2020_biotic"
    }
  }
  1. Declare layers

Both source and source-layer must be specified, for instance:

  "layers": [
    {
      "id": "landuse_abiotic",
      "source": "landuse",
      "source-layer": "LandUse_Sg_Sel_2020_abiotic",
      ...
    },
    {
      "id": "landuse_biotic",
      "source": "landuse",
      "source-layer": "LandUse_Sg_Sel_2020_biotic",
      ...
    }
  ]