lonboard icon indicating copy to clipboard operation
lonboard copied to clipboard

Epic: Z exploration

Open kylebarron opened this issue 2 months ago • 1 comments

  • [ ] Bind simple mesh layer to Lonboard
  • [ ] Example of TerrainLayer using Lonboard and python API of SimpleMeshLayer
  • [ ] Understand/document how to pass in vertices/mesh/texture directly
  • [ ] Generate triangle mesh from rectilinear mesh
  • [ ] public-facing easy APIs
  • [ ] Alternative coordinate systems?

cc @dcherian

kylebarron avatar Sep 26 '25 19:09 kylebarron

Scratch work for terrain layer visualization:

import lonboard
from imageio import imread
from pydelatin.util import decode_ele


path = "/Users/kyle/github/kylebarron/pymartini/test/data/fuji.png"
fuji = imread(path)
terrain = decode_ele(fuji, "mapbox")
# OverflowError: Python integer 65536 out of bounds for uint8
# new error in numpy v2.

png = imread(path)
png
terrain = decode_ele(png, encoding="terrarium").flatten("C")


tin = Delatin(tile, max_error=mesh_max_error)
vertices, triangles = tin.vertices, tin.triangles.flatten()
rescaled = delatin_rescale_positions(vertices, bounds, flip_y=flip_y)

kylebarron avatar Oct 08 '25 13:10 kylebarron