sweet progress

This commit is contained in:
2026-01-20 23:03:24 +01:00
parent 1f2601a1ed
commit 3cbea0d21e
3 changed files with 642 additions and 0 deletions

View File

@@ -4,6 +4,40 @@ Convert LAS lidar files to .mound binary format for Three.js rendering.
Usage:
python las_to_mound.py input.las output.mound
.mound Binary Format Specification
==================================
Header (64 bytes):
Offset Size Type Description
------ ---- ---------- -----------
0 4 char[4] Magic number: 'LIDR'
4 4 uint32 Version number (currently 1)
8 4 uint32 Point count (number of vertices)
12 4 uint32 Triangle count (number of triangles)
16 4 float32 Min X coordinate
20 4 float32 Min Y coordinate
24 4 float32 Min Z coordinate
28 4 float32 Max X coordinate
32 4 float32 Max Y coordinate
36 4 float32 Max Z coordinate
40 24 bytes Reserved (padding to 64 bytes)
Vertex Data (point_count * 12 bytes):
Series of vertices in XYZ float32 triplets.
Total size: point_count * 3 * 4 bytes
Index Data (triangle_count * 12 bytes):
Series of triangle indices (3 uint32 per triangle).
Each index references a vertex in the vertex data.
Total size: triangle_count * 3 * 4 bytes
Example layout for 100 points and 50 triangles:
Bytes 0-63: Header
Bytes 64-1263: Vertex data (100 * 12)
Bytes 1264-1863: Index data (50 * 12)
Total file size: 1864 bytes
"""
import sys