Skip to content
IGNFPublic

About

A WebGL2 map engine for large, interactive data layers, labels and 3D Tiles over raster or vector basemaps (Rust core in WebAssembly)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

689 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Isard

Maps that recolor at every mouse move.

A WebGPU map engine for large, interactive data layers, labels and 3D Tiles.
Rust core in WebAssembly, a small TypeScript API.

npm Documentation Checks Licence: MIT

Documentation · Examples · API · Changelog

The documentation site is private to the IGNF organization: it opens after a GitHub login with access to IGNF/isard.

Isard: rings drawn by a shader over the relief of the Mont Blanc, buildings colored by height, communes colored by population, the globe

Why Isard

General-purpose map libraries spend their time on things these maps do not need. Isard is built for maps where millions of features change at every mouse move: accessibility, flooding, flows.

  • ⚡ One upload, millions of features. A network of 2 million street pieces recolors from a single texture upload of 4 bytes per node, drawn in the very frame of the mouse move; only the squares in view are drawn.
  • 🗺️ Basemaps and relief, worldwide. OpenFreeMap's vector basemaps by default (OpenStreetMap data, no key), any MapLibre style drawn in workers with its labels above your data, raster tiles, a worldwide relief, on a globe that turns into Web Mercator. The Géoplateforme's data for France in one option or call: PLAN.IGN, orthophotos, hillshade, the IGN relief, any WMTS, WMS or WFS layer (Géoplateforme (IGN) data).
  • ⛰️ Everything on the relief. Lines, circles, labels and buildings stand on the ground; fills of any size are exact to the pixel over hills and valleys; your own GLSL is drawn over the ground like the basemap.
  • 🪐 The Moon, Mars, any body. body: 'moon', 'mars' or an ellipsoid of your own: the globe at its radius with its own atmosphere halo (or none), its metres in the camera, the relief and 3D Tiles, NASA's planetary mosaics reprojected in the page from longitudes and latitudes, and their relief: terrain: true raises Olympus Mons and digs Valles Marineris and the lunar craters from NASA's LOLA and MOLA models.
  • 🌃 A 3D vector city. Any MapLibre style as geometry (vectors()): its streets, water and buildings raised from its fill-extrusion layers, sharp at any zoom (its tiles cut again past the source's deepest level), 3D trees in its woods, the sun's shadows at any hour, the night with lit windows and glowing streets; indoor data floor by floor (a shopping mall, its shops raised and named).
  • 🌬️ Wind and currents. Particles carried by a field of velocities (a weather model's wind, an ocean's current), their trails animated on the globe and the relief, colored by speed; the model's hours along a clock, its own GRIB2 or NetCDF files read in workers, and down to a city's streets, round its buildings.
  • 🏙️ Buildings and 3D Tiles. Buildings colored by a value or by a network's travel times, photomeshes and city models in 3D Tiles (Draco, meshopt, KTX2), Gaussian splats in 3D Tiles (SPZ).
  • ☁️ Point clouds. LiDAR in COPC read by range requests (the IGN's LiDAR HD, reprojected from Lambert-93 onto the relief), a survey of many files as one (a VPC, LiDAR HD over France), 3D Tiles points; colored by RGB, class, altitude or intensity, Eye-Dome Lighting, a point budget, picked.
  • 🧊 Your own 3D. glTF models at positions, instanced and picked; custom layers for your WebGPU or WebGL code or a three.js scene, in the map's frame and depth, with camera-relative matrices exact at any zoom.
  • 🦀 Exact, and loaded as needed. The engine in one WebAssembly module (some 830 KB gzipped through WebGPU, 3D Tiles included), each format's decoder loaded apart with its first layer, f64 on the CPU and f32 relative to the camera on the GPU (centimetres at any zoom), frames on demand only, strict TypeScript types end to end.

Quick start

bun add isard     # or npm install isard
<div id="map" style="height: 100vh"></div>
import { GeoMap } from 'isard';

const map = await GeoMap.create(document.getElementById('map')!, { center: [2.35, 48.85], zoom: 12 });

map.addFills({
  data: { type: 'Feature', properties: {}, geometry: { type: 'Polygon', coordinates: [[[2.33, 48.84], [2.37, 48.84], [2.37, 48.87], [2.33, 48.87], [2.33, 48.84]]] } },
  color: '#2f6fd1',
  opacity: 0.4,
});

That is the whole integration: the map fills its container, follows its size, handles mouse and touch and loads the basemap. With a bundler, see Getting started.

Examples

Live in the documentation, sources in examples/.


The globe
turning in its atmosphere, a flight to a click

A map
the vector basemap, a marker and its popup

GeoJSON layers
fills by value, outlines, labels, picking

Buildings
raised to their height, colored by it

Relief and a ground shader
your GLSL over the mountains

Travel times on hover
a network recolored at every move

Vector basemaps
OpenFreeMap's styles, a restyled subset, the water drawn as geometry

3D Tiles
the Lille photomesh

A 3D vector map
Paris from a MapLibre style all as geometry: streets, raised buildings, trees, the sun's shadows

Wind
NOAA's GFS read from its GRIB2 file, particles carried by its wind through a day

The Moon
another body, the LRO mosaic over LOLA's relief, the Apollo sites

Mars
its thin dusty halo, the Viking mosaic over MOLA's relief, famous sites

What it draws

Layer
Networks addNetwork millions of edges colored by a value per node, worked out per pixel along the edges
Lines, circles, fills addLines, addCircles, addFills GeoJSON styled per feature: zoom stops, functions, values through a ramp, filters; in any CRS, KML, GPX, TopoJSON, Shapefile and CSV parsed
Labels addSymbols SDF fonts (Noto Sans by default, any glyphs), halos, along lines, collisions shared by all layers
Buildings addExtrusions tiles or one set, colored by values or by a network's times
Ground shaders addGround your fragment shader over the ground: water depth, heat maps
Rasters addRaster, addPmtiles XYZ, WMTS, WMS, PMTiles, Cloud-Optimized GeoTIFF (images, elevations, values through a ramp); in Web Mercator, or reprojected from another grid (longitudes and latitudes, Lambert-93, UTM, any CRS through proj4); or tiles drawn by your code
3D Tiles addTiles3d b3dm, i3dm, cmpt, pnts, glb, external tilesets, compressed or not
glTF models addModels a glTF model at many positions, instanced, on the relief, picked
Point clouds addPointCloud COPC (LiDAR HD) by range requests, many files as one (VPC), EPT, Potree 1.x and 2.0, pnts and glTF points; by class, altitude, intensity, EDL
Flows addFlow, readGrids particles carried by a wind or a current, a model's hours along a clock, its GRIB2 and NetCDF files read in workers, the wind through a city's streets (streetWind)
Custom layers addCustomLayer your WebGPU or WebGL code, or a three.js scene (isard/three), in the map's frame, tested against its depth

Plus markers, popups, controls, picking within a radius, easeTo, flyTo, a sky and fog for tilted views. All in the API reference.

Local files on a map: bun scripts/dev/viewer.ts data.geojson lidar.copc.laz tiles.pmtiles serves the viewer (apps/viewer: files dropped or given, a layer list, a bridge any app can drive) on 127.0.0.1 (The viewer).

In QGIS (3.28 and 4): the isard 3D view plugin shows the map canvas and its layers in 3D, in a panel or the browser, the camera, layers and clicks in sync (QGIS plugin). In Jupyter: pip install isard-map, a notebook widget whose layers are your GeoDataFrames (Python). On a phone: isard-react-native puts the map in a React Native app, and an Expo app shows the examples (Mobile). In a plain page, Angular or Vue: <isard-map>, the map as an HTML element (isard/element, A web component).

Fast by design

Geometry uploaded once and only the view drawn, values in textures, the ground composited in one pass, frames on demand, decoding and vector tiles in workers. The details and the measures: Performance.

Develop

Rust (with wasm32-unknown-unknown and wasm-bindgen-cli 0.2.129) and Bun:

bun install
bun run dev        # the demo on http://127.0.0.1:5180, the examples on /examples/, the benchmark on /bench/
bun run check      # every step of the CI's checks, then a table of what passed (--visual: the visual tests too)
bun run test       # Rust and TypeScript tests
bun run lint       # Biome, clippy pedantic (native and wasm)
bun run typecheck  # strict TypeScript
bun run docs:dev   # the documentation, with the examples live

The root holds two workspaces side by side: Rust (Cargo.toml) and TypeScript (package.json), and bun run build drives both. Each crate has its README; crates/README.md guides through them: crates/ the target architecture, legacy/crates/ the former base, frozen (fixes only) while its notions are ported.

crates/domain/geodesy/                 ellipsoids, the French geoid, the projections, the meridians' convergence             tested natively
bindings/geodesy/               the geodesy module: the SDK's built-in CRSs on crates/domain/geodesy, its JavaScript boundary only
legacy/crates/core/             the base (camera, tiles in view, polygons) and the trades' folders                    tested natively
legacy/crates/tiles3d/          3D Tiles tree, traversal and decoding                                                 tested natively
legacy/crates/lidar/            point clouds: COPC, EPT, Potree, octree hierarchy, traversal, LAZ chunks              tested natively
legacy/crates/scene/            the scene without a GPU: each layer's state and draw lists, the frame's graph walked  tested natively
legacy/crates/engine/           the map without a GPU: camera moves, layers, budgets, its host's ports (web, native)  tested natively
legacy/crates/renderers/wgpu/   the engine exported to JavaScript, on wgpu (WebGPU); natively too
legacy/crates/renderers/metal/  the second renderer: the scene's lists on Metal without wgpu, compared with wgpu's pictures
legacy/crates/renderers/scenes/ the scenes both renderers' tests draw alike
legacy/crates/weather/          the grid module: GRIB2 and NetCDF read into grids, the wind, the flow's particles     tested natively
legacy/crates/tools/            the command line isard: data reprojected, heights, panoramas prepared before the map  tested natively
packages/typescript/            the npm package isard: GeoMap, layer handles, overlays, workers
packages/react-native/          the npm package isard-react-native: the map in a React Native app's WebView
packages/python/                the Python package isard-map: the map as a Jupyter widget (anywidget)
apps/                           the demo, the viewer (local files, a bridge for other apps), the benchmark, the Expo app (mobile/),
                                the native app (native/: the engine in a window on Metal, Vulkan or DirectX 12, no browser)
examples/                       one page per example; in React (react/), React Native (react-native/), Python (python/)
docs/                           the documentation site (VitePress)
scripts/                        the tools by folder (scripts/README.md): build, test, lint, perf, docs, release, dev
integrations/qgis/              the QGIS plugin (Python), its server tested with python3 -m unittest; integrations/README.md: the bridge

More in Develop and release.

How the repository is organized

Built to be kept up for ten years by many trades, so each finds its own code in one place:

  • Performance above everything: nothing gets slower against main; a cost in bytes may be accepted on purpose, a cost in time may not.
  • Crates by layer: the core, pure (no GPU, no browser); the renderer, the only code that knows the GPU, so that replacing WebGPU one day rewrites one crate; the tools, the command line. A trade has a crate of its own only when it is loaded apart (lidar, weather, 3D Tiles: maps without them do not download them) or owned apart (geodesy).
  • Folders by trade, the same English names in every layer: geodesy, data, networks, relief, weather, lidar, city, cartography, imagery, defense, analysis (packages/typescript/src/<trade>/, test/<trade>/, the core's src/<trade>/). The base holds only what every trade uses.
  • Checked by bun run lint: the dependencies between trades as scripts/lint/trades.json declares them, without cycles (scripts/lint/trades.ts); no GPU or browser in a pure crate (scripts/lint/dependency-rule.ts); unit tests inline at the end of their module, as Rust has them.

The rules, why each one, and the table of the trades: Trades, and where their code lives.

Roadmap

By priority:

  • P1, next, what digital twin applications ask of the engine: the memory budget measured on a phone (#248), WebXR (#185). Done: a time for layers (#180), objects moving along paths (#181), photos projected onto the meshes (#187) and video in the scene (#192), 3D Tiles colored by an attribute checked never to flicker (#249), effects over the frame (#182).
  • P2, then: for defence and civil security, on a closed network (#262), MGRS and UTM (#263), a sensor's coverage volume in 3D (#264; lines of sight and the coverage at an altitude done), volumes between a floor and a ceiling (#265), military symbols (#266), DTED, GeoPackage, MBTiles and NITF (#267); the fills of GeoJSON layers held to the ground (#251), several projections on the globe (#252).
  • P3, later: Gaussian splats further (#253), flood maps by river section (#256), BIM further (#257).
  • P4, when time allows: a 3D vector map to walk through (#258), Panoramax further (#259), fluids further (#260).

See Roadmap.

Licence

The code: MIT, © 2026 Institut National de l'Information Géographique et Forestière (IGN). Basemap data: © OpenStreetMap contributors (OpenFreeMap, OpenMapTiles); IGN data: Licence Ouverte (Géoplateforme). Data files kept in the repository under their own licences: examples/mall/les-4-temps.geojson © OpenStreetMap contributors (ODbL), examples/smithsonian/discovery.glb the Smithsonian Institution (CC0).

About

A WebGL2 map engine for large, interactive data layers, labels and 3D Tiles over raster or vector basemaps (Rust core in WebAssembly)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages