My pretty large dataset consists of AIS transmitted messages. I load the dataset to a table in my db. Among other columns in this table, there are a longitude and a latitude column. I already transformed them into a geometry column on a new table. New table consists of id, geometry(point), timestamp. I need to find a way to create trajectories for each id. Although, if I just st_makeline(points) ordered by timestamp and grouped by id, all I get is a linestring per id. What needs to be done is that each id must have several trajectories/linestrings corresponding to it. So there must be a way to detect stops of each id during the period of dataset-timestamping, store them in a way that helps you define in which point(s) to "cut" each linestring and in how many pieces.

  • I worked on AIS years ago, so forget the actual details. But, I recall, apart from position, the AIS signal also contains information on destination. So, it ought to be relatively straightforward to mark a voyage as completed, once that point is reached. Failing that you could use some heuristic for number of lat/longs transmitted over a period of time that are in essentially the same place. – John Powell Jan 4 at 8:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.