Reminder snippets - liblas and reading laz files
The other thing that I used to do with this blog is post things that I wanted to remember. At one point the Vr forums were a good place to do this because it also gave an opportunity to share and collaborate. Since that doesn't really seem to be happening any more I suppose I could drop things here and then come back to them later if necessary. Yes I could just do this in a document but who knows maybe a new opportunity for some kind of sharing community will pop up again.
In this case I just want to remind myself that if Vr never adopts the .LAZ LiDAR compression format for reading, it would still be possible using liblas. This is simple a little interactive session that shows it is theoretically possible using my own data.
There may indeed be other better ways, but this seems to work fine.
>>> import liblas
>>> f=liblas.file.File(r'c:\tmp\N1915250.laz',mode='r')
>>> f
>>> p=f.read(100)
>>> p.classification
5
>>> p.x
1919853.35
>>> f.header.compressed
True
>>> f.filename
'c:\\tmp\\N1915250.laz'
No comments:
Post a Comment