X-GIS

Introducing X-GIS

A language for
cartography.

Declare what your map should look like. The compiler emits the WGSL shaders, buffer layouts, and projection math.

source land {
  type: geojson
  url: "data/land.geojson"
}

layer continents {
  source: land
  | fill-zinc-200
}
Loading…

Want to tweak it?   See more examples

WebGPU  ·  Seven projections  ·  MIT

The Approach

Beyond the library.

GIS rendering is locked to libraries. Mapbox, Deck.gl, OpenLayers — each has its own API, style format, and shader constraints. Switching means rewriting everything. X-GIS solves this with a language instead of an API.

— 01

Declarative, not procedural.

Write fill-red-500, stroke-black, opacity-80. Read the style — that is the program. No imperative API calls, no setter chains, no callback graph.

— 02

The compiler writes the shaders.

WGSL programs, buffer layouts, projection math, render strategies — all derived from your .xgis source. You never reach for a vertex shader.

— 03

One source, any view.

Switch from Mercator to Orthographic to Natural Earth via a uniform. The same data renders to a flat map, a globe, or anywhere else — no re-tessellation.

— 04

Zoom is a function input.

opacity-[interpolate(zoom, 8, 40, 14, 100)]. Camera state is a runtime value the compiler can sample — same shape works for feature properties.

Get Started

Clone, install, run.

npm release is in flight; for now the playground is the way in.

$ git clone https://github.com/X-GIS/X-GIS cd X-GIS bun install bun run dev

Bun workspace. The dev server boots the playground at localhost:3000.

import { XGISMap } from "@xgis/runtime"

const map = new XGISMap(canvas)
await map.run(source, baseUrl)

WebGPU when available. Canvas 2D fallback when not.