Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
... and avoid coordinates system like WGS 84 (EPSG: 4326) or pseudo-mercator (EPSG: 3857) for compute distances, project your data first, distances in degrees don't work very well ...
points to lines
and calculate the$length
.