Hi Alteryx Community,
I would like to calculate the distance between 1000s of points (in rows) in a table.The points are records from GPS Telematics data, with each point representing a point on a road that a car travelled on. The points are spatially distributed and I applied a buffer. I now like to have a workflow that calculates the distance between row 0 and row +1, as in the distance between the current and following row data going through the entire table.
I have these data:
Record ID, Long, Lat, Date (UTC format) , Time (UTC format), Direction (Degrees), Vehicle ID
Anyone have any ideas?Even partial solutions? Thank you!
Solved! Go to Solution.
Many Alteryx users don't realize therre are spatial functions available for use in an expression.
Use a multi-row formula tool with something like the following...
ST_Distance(ST_CreatePoint([Row-1:Longitude],[Row-1:Latitude]),ST_CreatePoint([Longitude],[Latitude]),"Mi")
Great! Thank you!
Just realized that I didn't configure the expression correctly. I had "Row-1:" in the second point for the Latitude.
I've modified my post to correct this.
I noticed that and adapted it to my configuration. Thank you for correcting it for other users though. Thanks again.
Kindly If the data is not confidential could you share it in this thread or in private?