spaghetti.Network.compute_snap_dist

Network.compute_snap_dist(self, pattern, idx)[source]

Given an observation snapped to a network arc, calculate the distance from the original location to the snapped location.

Parameters
patternspaghetti.network.PointPattern

point pattern object

idxint

point id

Returns
distfloat

euclidean distance from original location to snapped location.