WarrenWeckesser/las

Print the header

raquelsilva opened this issue · 6 comments

Hello!

I need to print only the header of a .las file. How could I do it?

Hello @raquelsilva,

What do you mean by "print only the header"? Does that mean literally print everything in the file up to but not including the data section? That could be as simple as:

with open('filename.las', 'r') as f:
    for line in f:
        if line.lstrip().startswith('~A'):
            break
        print(line.rstrip())

@raquelsilva I think this issue is in the same category as #2. It sounds like you need something with more capabilities than the simple reader provided by this package. I'm closing this issue, but I'll be thinking about possible future enhancements for the package.