About Shigola
Shigola is a vector tile server written in Go. It reads geospatial data from PostGIS, GeoPackage or SAP HANA Spatial and serves it as Mapbox Vector Tiles, over both its native tile routes and a standards-compliant OGC API - Tiles surface.
Source: MapColonies/shigola.
What it serves
OGC API - Tiles
An OGC API - Tiles surface — landing page, conformance declaration,
collections, tilesets, tiles and tiling-scheme definitions — alongside the native /maps/... routes.
Verified against the official OGC CITE executable test suite.
See OGC API - Tiles.
Multiple tile matrix sets
Shigola carries the OGC register of tile matrix sets as data and serves three of them —
WebMercatorQuad, WorldCRS84Quad and WGS1984Quad — selectable per map with tile_matrix_sets.
See Tile matrix sets.
Layered cache
type = "multi" puts an ordered chain of cache backends behind the single [cache] table: reads
walk the tiers and promote a hit, writes fan out, and no user response waits on a cache write.
See Layered cache.
Behaviour worth knowing
Three things commonly surprise people setting Shigola up for the first time:
| The service root is the OGC landing page. | / returns JSON. The embedded viewer is at /viewer — /viewer redirects to /viewer/, and the trailing slash matters because the viewer's assets are referenced relatively. An unknown path returns 404. |
| Cache keys begin with the tiling scheme. | The key is {tileMatrixSetId}/{map}/{layer}/{z}/{x}/{y}. Without the scheme, tiles cut in two different schemes would collide at the same z/x/y. |
| Cache writes do not block the response. | Every cache, chained or not, hands its write to a bounded pool after the response is flushed. See Layered cache. |
Credits
- Tegola — Shigola is a fork of go-spatial/tegola, an open source vector tile server created and maintained by the Go Spatial team and documented at tegola.io. Effectively all of this codebase is their work: the providers, the geometry processing, the MVT encoder, the tile pipeline and the viewer all originate there. Tegola is MIT licensed, Shigola keeps that licence and retains its copyright notice, and all credit for what Shigola inherited belongs upstream.
- morecantile — Shigola's
tmspackage is a faithful Go port of developmentseed/morecantile 7.0.3, MIT licensed © Development Seed. Its document model, tile algorithms, bundled grid definitions and test suite were all translated, and morecantile's golden values act as the port's correctness oracle. The license is reproduced in the source tree attms/LICENSE-morecantile. - OGC API - Tiles is a standard of the Open Geospatial Consortium. Conformance is verified with OGC's own CITE test suite.