Esri's LEPCC decoders (I3S point clouds: lepcc-xyz, lepcc-rgb, lepcc-intensity) in MoonBit
moon add t-ujiie-g/lepcc/// The number of points in a `lepcc-xyz` resource, or None if it is malformed.
fn point_count(resource : FixedArray[Byte]) -> Int? {
guard @lepcc.decode(Xyz, resource, 0, resource.length()) is Some(out) else {
return None
}
Some(out[0].to_int() | (out[1].to_int() << 8) | (out[2].to_int() << 16) | (out[3].to_int() << 24))
}| Bytes | Content |
|---|---|
| 8 | u32 count n, u32 0 |
| 24 × n (Xyz) | f64 x, y, z per point, absolute coordinates in the layer's spatial reference |
| 3 × n (Rgb) | u8 r, g, b per point |
| 2 × n (Intensity) | u16 per point |
let MAX_POINTS : IntInstall
Download zipEsri's LEPCC decoders (I3S point clouds: lepcc-xyz, lepcc-rgb, lepcc-intensity) in MoonBit