tilegroxy Docs
See Layer Patterns for more on how patterns work.

Configuration

  • YAML

  • JSON

cache:
  name: memory
  maxsize: 5000
layers:
  - id: noaa_poststorm
    pattern: noaa_poststorm_{version} (1)
    paramValidator:
      version: "[0-9]{8}[ab]" (2)
    examples: (3)
      - noaa_poststorm_20230902a
      - noaa_poststorm_20230831b
    client:
      contenttypes: (4)
        - binary/octet-stream
        - image/png
      timeout: 2
    provider:
      name: fallback
      primary:
        name: proxy
        url: https://stormscdn.ngs.noaa.gov/{layer.version}-rgb/{z}/{x}/{y} (5)
      secondary:
        name: static
        color: FFF0 (6)
  - id: hurricane_idalia
    provider:
      name: blend
      mode: normal
      layer: (7)
        pattern: noaa_poststorm_{version}
        values:
          - version: 20230902a (8)
          - version: 20230901b
          - version: 20230901a
          - version: 20230831b
          - version: 20230831a
1 The {version} placeholder matches any flight, so a request for noaa_poststorm_20230902a serves that flight.
2 The version is part of the upstream URL, so it’s restricted to eight digits and a letter. Expressions are matched against the whole value. See Security.
3 Pattern layers have no single name to test with, so the test command and TileJSON use these instead.
4 NOAA serves tiles as binary/octet-stream, which isn’t in the default allowlist. This override applies to this layer only, along with a shorter timeout. See Content Type.
5 {layer.version} is replaced with the value matched by the pattern.
6 Each flight only covers a strip of coast and returns an error everywhere else. The fallback returns a fully transparent tile there instead, so the flights can be stacked.
7 Expands into one reference per entry, each to a layer name built from the pattern. This is equivalent to listing a ref provider for each flight under providers. See Blend.
8 Earlier entries are drawn on top of later ones, so the most recent flight is listed first.
{
  "cache": {
    "name": "memory",
    "maxsize": 5000
  },
  "layers": [
    {
      "id": "noaa_poststorm",
      "pattern": "noaa_poststorm_{version}", (1)
      "paramValidator": { (2)
        "version": "[0-9]{8}[ab]"
      },
      "examples": [ (3)
        "noaa_poststorm_20230902a",
        "noaa_poststorm_20230831b"
      ],
      "client": {
        "contenttypes": [ (4)
          "binary/octet-stream",
          "image/png"
        ],
        "timeout": 2
      },
      "provider": {
        "name": "fallback",
        "primary": {
          "name": "proxy",
          "url": "https://stormscdn.ngs.noaa.gov/{layer.version}-rgb/{z}/{x}/{y}" (5)
        },
        "secondary": {
          "name": "static",
          "color": "FFF0" (6)
        }
      }
    },
    {
      "id": "hurricane_idalia",
      "provider": {
        "name": "blend",
        "mode": "normal",
        "layer": { (7)
          "pattern": "noaa_poststorm_{version}",
          "values": [
            {
              "version": "20230902a" (8)
            },
            {
              "version": "20230901b"
            },
            {
              "version": "20230901a"
            },
            {
              "version": "20230831b"
            },
            {
              "version": "20230831a"
            }
          ]
        }
      }
    }
  ]
}
1 The {version} placeholder matches any flight, so a request for noaa_poststorm_20230902a serves that flight.
2 The version is part of the upstream URL, so it’s restricted to eight digits and a letter. Expressions are matched against the whole value. See Security.
3 Pattern layers have no single name to test with, so the test command and TileJSON use these instead.
4 NOAA serves tiles as binary/octet-stream, which isn’t in the default allowlist. This override applies to this layer only, along with a shorter timeout. See Content Type.
5 {layer.version} is replaced with the value matched by the pattern.
6 Each flight only covers a strip of coast and returns an error everywhere else. The fallback returns a fully transparent tile there instead, so the flights can be stacked.
7 Expands into one reference per entry, each to a layer name built from the pattern. This is equivalent to listing a ref provider for each flight under providers. See Blend.
8 Earlier entries are drawn on top of later ones, so the most recent flight is listed first.

Try it

Hurricane Idalia made landfall in Florida’s Big Bend in late August 2023. Request a tile over the coast near Cedar Key:

tilegroxy serve -c storm-imagery.yml
curl -o idalia.png http://127.0.0.1:8080/tiles/hurricane_idalia/14/4412/6804

Since the result is transparent outside the imagery, it’s meant to be displayed above a basemap in your map client.