Skip to main content
Solved

Get time's attributs from LAS gps time

  • March 24, 2026
  • 3 replies
  • 40 views

pabloolivaresm
Supporter
Forum|alt.badge.img+5

Hi, 

I have many LAS tiles with gps_time component. Gps time values are in standard GPS Time : ex 363439432.1942503

 

I would like to display the minimum and maximum times in DD/MM/YYYY HH:MM:SS format. I can use the PointCloudStatisticsCalculator to get the minimum and maximum values, but I can't work out how to convert 363439432.1942503 to the required format.

 

Any idea? 

Thanks u ! 

Best answer by nielsgerrits

No standard transformer to do this but GPS time is seconds since 00:00:00 UTC on 6 january 1980 without leap seconds. You can calculate this using an AttributeCreator:

@DateTimeFormat(
  @DateTimeAdd(
    @DateTimeParse("1980-01-06T00:00:00Z","%Y-%m-%dT%H:%M:%SZ"),
    P0Y0M0DT0H0M@Value(gps_time)S
  ),
  "%d/%m/%Y %H:%M:%S"
)

If gps_time = 363439432.1942503 then datetime is 13/07/1991 11:23:52.194250286.

@DateTimeAdd needs the ISO 8601 duration format, also see the documentation:

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/!Transformer_Parameters/standard_fme_date_time_format.htm#ISO-8601-Duration-Format

Be aware: It looks like the function for adding datetime is changed between 2025.2 and 2026.1 so you might have to change the solution depending on your version. It used to be @DateTimeAdd() but is @AddDateTime() according to the newer documentation.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+62

Do you happen to know the version of the LAS file? There’s been different time formats used across different versions (but of course… 😐)


pabloolivaresm
Supporter
Forum|alt.badge.img+5

Do you happen to know the version of the LAS file? There’s been different time formats used across different versions (but of course… 😐)

@redgeographics  Sorry I forgot to include the version. It’s LAS 1.2


nielsgerrits
VIP
Forum|alt.badge.img+65
  • Best Answer
  • March 24, 2026

No standard transformer to do this but GPS time is seconds since 00:00:00 UTC on 6 january 1980 without leap seconds. You can calculate this using an AttributeCreator:

@DateTimeFormat(
  @DateTimeAdd(
    @DateTimeParse("1980-01-06T00:00:00Z","%Y-%m-%dT%H:%M:%SZ"),
    P0Y0M0DT0H0M@Value(gps_time)S
  ),
  "%d/%m/%Y %H:%M:%S"
)

If gps_time = 363439432.1942503 then datetime is 13/07/1991 11:23:52.194250286.

@DateTimeAdd needs the ISO 8601 duration format, also see the documentation:

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/!Transformer_Parameters/standard_fme_date_time_format.htm#ISO-8601-Duration-Format

Be aware: It looks like the function for adding datetime is changed between 2025.2 and 2026.1 so you might have to change the solution depending on your version. It used to be @DateTimeAdd() but is @AddDateTime() according to the newer documentation.