func coordsJoined2D(values []float64) geom.Coords {
	if len(values) < 2 {
		return coords64.NewCoords64()
	}
	c1 := coords64.NewCoords64FromSlice(2, values[:2])
	c2 := coords64.NewCoords64FromSlice(2, values[2:])
	return geom.NewCoordsJoined(c1, c2)
}
Exemple #2
0
func TestNewLineInsufficientCoords(t *testing.T) {
	assert.Panics(t, func() { geom.NewLine(coords64.NewCoords64()) })
}