// Add collection of coordinates to MultiLineString
// new data are append
437056
func (t *MultiLineString) AddCoordinates(coordinates ...Coordinates) {
	t.Coordinates = append(t.Coordinates, coordinates...)
}
513597
func (calc *LineCentroidCalculator) AddLine(line *geom.LineString) *LineCentroidCalculator {
	coords := line.FlatCoords()
	calc.addLine(coords, 0, len(coords))
	return calc
}
1209395
func DistanceFromPointToLineString(layout geom.Layout, p geom.Coord, line []float64) float64 {
	if len(line) < 2 {
		panic(fmt.Sprintf("Line array must contain at least one vertex: %v", line))
	}
	// this handles the case of length = 1
	firstPoint := line[0:2]
	minDistance := internal.Distance2D(p, firstPoint)
	stride := layout.Stride()
	for i := 0; i < len(line)-stride; i += stride {
		point1 := geom.Coord(line[i : i+2])
		point2 := geom.Coord(line[i+stride : i+stride+2])
		dist := DistanceFromPointToLine(p, point1, point2)
		if dist < minDistance {
			minDistance = dist
		}
	}
	return minDistance
}
267423
func NewLineStringFlat(layout Layout, flatCoords []float64) *LineString {
	g := new(LineString)
	g.layout = layout
	g.stride = layout.Stride()
	g.flatCoords = flatCoords
	return g
}
898071
func (s *RadialSimplifier) LineString(ls orb.LineString) orb.LineString {
	return lineString(s, ls)
}
811108
func (t *LineString) AddCoordinates(c ...Coordinate) {
	t.Coordinates = append(t.Coordinates, c...)
}
1280827
func (s *VisvalingamSimplifier) LineString(ls orb.LineString) orb.LineString {
	return lineString(s, ls)
}
101641
func (q *GeoPolygonQuery) AddGeoPoint(point *GeoPoint) *GeoPolygonQuery {
	q.points = append(q.points, point)
	return q
}
253282
func flattenStringList(list []*string) []interface{} {
	vs := make([]interface{}, 0, len(list))
	for _, v := range list {
		vs = append(vs, *v)
	}
	return vs
}
1057361
func (d *Dataset) Append(row []interface{}) error {
	if len(row) != d.cols {
		return ErrInvalidDimensions
	}
	d.data = append(d.data, row)
	d.tags = append(d.tags, make([]string, 0))
	d.rows++
	return nil
}
817946
func (c *BarChart) AddData(name string, data []Point, style Style) {
	if len(c.Data) == 0 {
		c.XRange.init()
		c.YRange.init()
	}
	c.Data = append(c.Data, BarChartData{name, style, data})
	for _, d := range data {
		c.XRange.autoscale(d.X)
		c.YRange.autoscale(d.Y)
	}

	if name != "" {
		c.Key.Entries = append(c.Key.Entries, KeyEntry{Style: style, Text: name, PlotStyle: PlotStyleBox})
	}
}
674845
func (r *RegexpList) Add(val string) {
	for _, item := range *r {
		if item == val {
			return
		}
	}

	tmpData := append(*r, val)

	sort.Slice(tmpData, func(i, j int) bool {
		return len(tmpData[i]) < len(tmpData[j])
	})

	*r = tmpData
}
258873
func EncodeLineString(ls *geom.LineString) kml.Element {
	flatCoords := ls.FlatCoords()
	return kml.LineString(kml.CoordinatesFlat(flatCoords, 0, len(flatCoords), ls.Stride(), dim(ls.Layout())))
}
35280
func (t *Polygon) AddGeometry(g interface{}) error {
	switch c := g.(type) {
	case MultiLine:
		t.AddCoordinates(c...)
		break
	case Coordinates:
		t.AddCoordinates(c)
		break
	default:
		return errors.New(fmt.Sprintf("AssertionError %v", g))
	}
	return nil
}
403300
func (this *Put) AddStringValueTS(family, column, value string, ts int64) {
	this.AddValueTS([]byte(family), []byte(column), []byte(value), ts)
}
816264
func (sc *StripChart) AddData(name string, data []float64, style Style) {
	n := len(sc.ScatterChart.Data) + 1
	pd := make([]EPoint, len(data))
	nan := math.NaN()
	for i, d := range data {
		pd[i].X = d
		pd[i].Y = float64(n)
		pd[i].DeltaX, pd[i].DeltaY = nan, nan
	}
	if style.empty() {
		style = AutoStyle(len(sc.Data), false)
	}
	style.LineStyle = 0
	sc.ScatterChart.AddData(name, pd, PlotStylePoints, style)
}
1111499
func MultiLineString(b orb.Bound, mls orb.MultiLineString, opts ...Option) orb.MultiLineString {
	open := false
	if len(opts) > 0 {
		o := &options{}
		for _, opt := range opts {
			opt(o)
		}

		open = o.openBound
	}

	var result orb.MultiLineString
	for _, ls := range mls {
		r := line(b, ls, open)
		if len(r) != 0 {
			result = append(result, r...)
		}
	}
	return result
}