FOSS4G 2022 general tracks

Gleo: Reinventing WebGL maps
2022-08-25, 14:45–15:15 (Europe/Rome), Room Limonaia

WebGL has enabled fast rendering of maps on the web (including MapLibreGL and OpenLayers renderers), but from the software development point of view, is a notoriously cumbersome technology to work with.

This session introduces Gleo, a JavaScript+WebGL map display library aiming to cover similar use cases than Leaflet, OpenLayers, MapZen and MapLibreGL.

A few architectural features of Gleo will be outlined, including:
- "One GL shader per type of cartographic symbol" rendering & framebuffer compositing approach
- Object-oriented design: symbols as instances; allocation/deallocation of GPU resources for each symbol
- ES6 javascript features: classes, modules, private fields; symbol as DOM EventTarget; deprecation of mouse/touch events in favour of pointer events
- Sliding window algorithm in a wrapped WebGL texture for tile caching
- On-the-fly reprojection enabled by updating just one WebGL data structure
- On-the-fly CRS offsetting to prevent floating-point precision artifacts
- Coordinate wrapping and display tessellation to avoid antimeridian artifacts

Iván has been a web developer and FLOSS advocate since the early 2000s; then he bought a GPS receiver and got involved in OpenStreetMap and OSGeo. He’s worked with nautical charts, indoor positioning, USB microcontrollers, LibreOffice, multispectral rasters, all of it with unhealthy amounts of Javascript.