Skip to main content
Question

Aggregate datetime in range

  • December 4, 2018
  • 4 replies
  • 25 views

djmcdermott
Contributor
Forum|alt.badge.img+7

Hi FME'ers,

 

I have a table containing weather forecast data every 3 hours over a 24 hour period. The time value is recorded in minutes past midnight, e.g. 180, 360, 540 etc. This table is updated at midnight and filtered to only records where the chance of precipitations is greater the 20%. I would like to aggregate these records where they occur consecutively with a start and end date

 

E.g. If rain is forecast for a continuous 9 hour then for 3 hours that would be aggregated into two record

Thanks,

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • December 4, 2018

I would make use of the adjacent attribute feature in an attributecreator to create groupings, e.g. first value has group of zero, if the next attribute minute value is equal to the previous minute value plus 180 assign group zero, otherwise increment one to the group value. This grouping can then be used to aggregate


djmcdermott
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 43 replies
  • December 4, 2018

Hi @egomm. Thank you for responding so quickly. I have had a play with the adjacent feature function and it looks promising. How do I handle incrementing the group value? Can you provide an screenshot?


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • December 4, 2018

Hi @egomm. Thank you for responding so quickly. I have had a play with the adjacent feature function and it looks promising. How do I handle incrementing the group value? Can you provide an screenshot?

Not sure exactly what end result you are aiming for but this should give a demo of the adjacent feature function.

Incrementing is done with a conditional formula

rainfall.fmwt


djmcdermott
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 43 replies
  • December 4, 2018

Not sure exactly what end result you are aiming for but this should give a demo of the adjacent feature function.

Incrementing is done with a conditional formula

rainfall.fmwt

Work great! Thank you