Skip to content

Commit a1cd171

Browse files
committed
fix reduce, only for less than 100 points
1 parent 485a101 commit a1cd171

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

reduce/reduce.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ func ReducePoints(points []*pb.Point) []*pb.Point {
1111
if len(points) == 0 {
1212
return points
1313
}
14+
if len(points) <= 100 {
15+
return points
16+
}
1417
original := orb.LineString{}
1518
for _, point := range points {
1619
original = append(original, orb.Point{float64(point.Lng), float64(point.Lat)})

0 commit comments

Comments
 (0)