davidcaron / pye57

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

get timeStamp field #64

Open Bolhan opened 4 months ago

Bolhan commented 4 months 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 4 months 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 4 months 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))
jamesfisher-geo commented 2 months ago

This works for me when reading the images:

image2D['acquisitionDateTime']["dateTimeValue"].value()