I want to compare the attributes from two features in same shape-file. If the timestamp attribute does not differ more than one minute from the timestamp attribute from the previous Point, I want to create a line between the points with PointConnector. Does anyone have any idea how to make this comparision?
you can test the dates and see if the fall within a minute range.
You could also calculate the dates difference date calculator is the store transformer to use I believe and test the difference
Tip if you are using the dates for the test format them first using the dareformatter with the 's' setting
Hi @keoe, expanding Itay's idea regarding %s format, I would add line ID attribute that can be used to group the points by the AttributeCreator with combination of the Advanced options and Conditional Value setting.
- DateFormatter: Format the timestamp value with %s format (count of seconds elapsed from the epoch).
AttributeExposer: Expose the line ID attribute name (e.g. "_line_id"). It has no value yet.
AttributeCreator: Assign actual value to "_line_id" as the screenshot illustrates.- PointConnector: Set "_line_id" to the "Connection Break Attributes" parameter.
[Addition] The intention of this setting is: If the number of seconds elapsed from the timestamp of the previous point is greater than 60, assign "ID of previous point + 1". Otherwise assign the same ID as previous point.
Thank you @takashi! Your solution works fine.