mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-12-23 17:02:22 +00:00
15 lines
487 B
Python
15 lines
487 B
Python
|
# This software is MIT licensed
|
||
|
# by Radost Waszkiewicz 2023
|
||
|
#
|
||
|
# This script extracts height information from a .3d file
|
||
|
# and formats it into an array that will later be used by
|
||
|
# a javascript web tool.
|
||
|
|
||
|
import survex3dreader
|
||
|
import pprint
|
||
|
|
||
|
data = survex3dreader.read_svx_file("1623-and-1626-with-terrain.3d")
|
||
|
surface_grid = [x for x in data["station_list"] if "srtm" in x[1]]
|
||
|
# meters to centimeters
|
||
|
pprint.pprint([[x[0][0] / 100, x[0][1] / 100, x[0][2] / 100] for x in surface_grid])
|