Gist 63540e65c30a453a7e2e9b0345aa42ce
✓ Published0🌍 Public
Aandybak
Last edited Oct 16, 2020
Created on Oct 16, 2020
This example renders a 3D cityscape from geospatial building footprints, showing extruded building volumes colored in a uniform teal tone. It queries buildings within a given distance of a latitude/longitude point using Django’s GeoQuerySet (`outline__dwithin`) and converts each polygon outline with Shapely, then extrudes it with Trimesh’s `creation.extrude_polygon`. The scene is centered via a translation matrix, scaled, and exported as a GLB file using Trimesh’s `exchange.gltf.export_glb`. The visualization highlights building heights relative to their footprint areas.
AI-generated description