ποΈCoast, shore, and ports
Extracting distance features from and to points-of-interest using raster files.
The distances of a vessel from the nearest shore, coast, and port are essential to perform particular tasks such as vessel behavior analysis, environmental monitoring, and maritime safety assessments. AISdb offers functions to acquire these distances for specific vessel positions. In this tutorial, we provide examples of calculating the distance in kilometers from shore and from the nearest port for a given point.
First, we create a sample track:
Here is what the sample track looks like:
Distance from shore
The class aisdb.webdata.shore_dist.ShoreDist
is used to calculate the nearest distance to shore, along with a raster file containing shore distance data. Currently, calling the get_distance
function in ShoreDist
will automatically download the shore distance raster file from our server. The function then merges the tracks in the provided track list, creates a new key, "km_from_shore", and stores the shore distance as the value for this key.
Distance from coast
Similar to acquiring the distance from shore, CoastDist
is implemented to obtain the distance between the given track positions and the coastline.
Distance from port
Like the distances from the coast and shore, the aisdb.webdata.shore_dist.PortDist
class determines the distance between the track positions and the nearest ports.
Last updated