I am currently attempting to plot AIS data from our on board AIS receiver in QGIS. (https://en.wikipedia.org/wiki/Automatic_identification_system)
My current processing steps are :-
- Import the AIS data as a CSV file containing Time, Vessel Name, MMSI No, Lat & Lon.
- Save imported data as a shapefile
- Remove AIS positions outside area of interest using select feature by polygon, invert selection and delete selected.
- Convert points to paths using order by time and group by MMSI No
This produces paths of the vessel track.
My problem is that vessels occasionally have a large gap in their AIS data that leads to un-realistic paths, i.e passing over land.
Is there are way to sort by MMSI number (Unique to each vessel) and then assign a unique cluster number to the AIS record, based on the distance between the AIS record positions for each MMSI?
i.e If a vessel has a gap in it's MMSI data of greater than 5000m assign a new cluster number to that record.
I would need to do this on a vessel by vessel basis, so that only the the AIS data for each specific vessel is examined.
If I then use points to paths and group by cluster number, it should then draw the path for all AIS data points with a gap of less than 5000m.
I followed @Spatialthoughts’ instructions and they worked perfectly.
Removing segments over 5 km long has improved the readability of the information and produces a more realistic plot of the AIS data.