Rendering hundreds of multi-story buildings with individual floor plates at 60 frames per second in the browser—without duplicating geometry for every floor—required custom GPU shader engineering and a deterministic geospatial pipeline.
1. Custom GLSL FloorSliceExtension
Instead of generating separate polygon meshes for each floor of a 16-story building, we extrude each building footprint once and inject a custom Deck.gl LayerExtension into the vertex and fragment shaders:
- Procedural Floor Lines: Using
mod(vPosition.z, 3.2), the fragment shader darkens horizontal bands every3.2meters to delineate individual stories. - Zero-Allocation Floor Slicing: When you drag the Floor Slicing slider, the uniform
uSliceElevationupdates on the GPU and executesif (vPosition.z > uSliceElevation) discard;—slicing the entire city horizontally at 60 FPS with zero CPU buffer re-uploads. - Interactive Floor Highlight: Hovering or clicking a specific elevation illuminates that 3.2m slab (
uSelectedFloor) in electric cyan.
2. Multi-Tier Address Entity Resolution
Classified listings on verified regional portals rarely include exact GPS coordinates; instead, agents write free-form Russian or Kyrgyz addresses such as "мкр Асанбай 28, ориентир Томми Молл". Our Python FastAPI crawler resolves these descriptions into PostGIS building_id foreign keys using:
- Normalized street and microdistrict dictionary matching.
- Trigram similarity (
pg_trgm) and building series validation (104,105,106,monolith). - Geodesic proximity verification against known landmark POIs.
