高效的3D-Morton编解码
Morton3D的Python项目详细描述
摩顿3d(Homepage)
3D Morton编码和解码的高效pythonic实现。在
安装
pip安装:
pip install Morton3D==1.0.1
从源安装:
^{pr2}$用法
importMorton3Dm=Morton3D.zorder(9)# 9 is the bit lengthmortonValue,mortonBinary=m.Morton(51,20,50)# encoding, (51,20,50) is the 3D integer coordinate.coordinate=m.deMorton(192681,0)# decoding, given the mortonValue, return the 3D coordinate# decoding, given the morton value in bit representation, return the 3D coordinate, 1 is the flag.coordinate=m.deMorton('000000000101111000010101001',1)
- 项目
标签: