davidcaron / pye57

Read and write e57 point clouds from Python
MIT License
68 stars 42 forks source link

get timeStamp field #64

Open Bolhan opened 1 month ago

Bolhan commented 1 month ago

I do work daily with e57 files containing the timestamp field. unfortunately, the latter is not supported.

Is there any planning upgrade that supports this timeStamp field reading?

dancergraham commented 1 month ago

Hello,

Can you show me which timestamp you are looking for? Do you have another way to get it manually ? There are no specific plans to add this but it sounds useful

dancergraham commented 1 month ago

I am able to get the time stamp using my other e57 library something like this: python -m pip install e57

and then

from datetime import datetime
import re

import e57

xml = e57.raw_xml(r".bunnyDouble.e57")
dt = re.search(r'<dateTimeValue type="Float">(.*)</dateTimeValue>', xml).group(1)
dt = datetime.fromtimestamp(float(dt))