Skip to content

Files

Latest commit

ddd0f56 · Feb 16, 2022

History

History
This branch is 1 commit ahead of paulmach/orb:master.

resample

orb/resample Godoc Reference

Package resample has a couple functions for resampling line geometry into more or less evenly spaces points.

func Resample(ls orb.LineString, df orb.DistanceFunc, totalPoints int) orb.LineString
func ToInterval(ls orb.LineString, df orb.DistanceFunc, dist float64) orb.LineString

For example, resampling a line string so the points are 1 planar unit apart:

ls := resample.ToInterval(ls, planar.Distance, 1.0)