rendering vectors on a globe
How ContextSplat renders vector data (GeoJSON, SHP): two practical methods, their trade-offs, and the algorithms we use to keep accuracy on a curved Earth.
Scope and data
Vectors are points, lines and polygons loaded from common formats (GeoJSON or ESRI Shapefiles). ContextSplat supports two rendering modes: draped rasterized vector tiles and true 3D geometry. Use the first when you need map-like overlays and multi-LOD performance; use the second when you need selectable, high-fidelity 3D geometry.
1) Draped vectors
ContextSplat renders vectors by rasterizing them into a multi-LOD clipmap. The clipmap uses either an equidistant or Web-Mercator projection and produces tiles at multiple resolutions.
Pipeline (high level)
- Rasterize shapes into an image atlas per LOD (vector styling is applied during rasterization).
- Build a multi-LOD clipmap that stores these images (same system used for tiled maps).
- During frame-rendering, after terrain, meshes and Gaussian splats are drawn, project the clipmap down into the position buffer to composite the draped vectors.
Why do this?
Rasterized draping allows the vectors to precisely match any rendered geometry, be it terrain, meshes or gaussian splats
Precision challenge and solution
Projecting raster images onto the position buffer can lose precision at large coordinates. ContextSplat uses a floating origin and projects maps using a local tangent plane (east-north-up) or a transverse Mercator reference centered on the current tile. By working in a local reference frame the system maintains sub-centimeter accuracy when compositing the draped images back onto the scene.
2) Shapes as 3D geometry
When vectors represent geometry at a certain height, we render them as 3D objects. This requires the shapes to follow Earth's curvature and handle edge cases such as the antemeridian wrap.
Key challenges
- Earth is spherical — flat triangulation leads to visible gaps or overlaps at large extents.
- Antemeridian crossing — coordinates jump from +180 to −180 longitude.
- Maintaining numerical precision for large, global coordinates.
Solution: local azimuthal projection + concentric triangulation
ContextSplat reprojects each shape into an equidistant azimuthal projection centered on the shape's center of mass (centroid). In that projection:
- The shape lies on a planar disk with true distances from the center preserved (equidistant azimuthal).
- ContextSplat triangulates the shape by slicing it into concentric rings (like onion layers) and triangulating each ring. This produces stable, well-shaped triangles that follow the original planar shape.
Reprojection back to Earth
Once the shape is triangulated in the azimuthal plane, each vertex is re-projected to geodetic coordinates and then converted to a Cartesian Earth-Centered, Earth-Fixed (ECEF) frame for rendering as standard 3D geometry in the scene. Using a projection centered on the shape avoids global distortions and handles the antemeridian transparently because the local azimuthal domain is continuous around the center.
Extra notes on robustness
- For very large polygons we split the shape into smaller tiles (by area or angular extent) and process each tile with its own local projection to avoid excessive projection distortion.
- ContextSplat preserves attribute data (IDs, styling properties) per triangulated primitive so interaction (picking, highlighting) maps cleanly back to the source feature.
Performance: batching & instancing
All shapes are emitted using GPU-friendly strategies: Lines and polygons are grouped into large vertex/index buffers (batched) and points are drawn using hardware instancing. Together these techniques keep rendering efficient at scale.