diff pkg/imports/ubn.go @ 2563:dc4fae4bdb8f

Expose axis snapping tolerance to users
author Tom Gottfried <tom@intevation.de>
date Fri, 08 Mar 2019 19:15:47 +0100
parents cfc523c70e90
children 4acbee65275d
line wrap: on
line diff
--- a/pkg/imports/ubn.go	Fri Mar 08 18:57:58 2019 +0100
+++ b/pkg/imports/ubn.go	Fri Mar 08 19:15:47 2019 +0100
@@ -26,6 +26,8 @@
 
 type UploadedBottleneck struct {
 	Dir string `json:"dir"`
+	// Tolerance used for axis snapping
+	Tolerance float64 `json:"tolerance"`
 }
 
 // UBNJobKind is the import queue type identifier.
@@ -84,5 +86,6 @@
 		return dst.Export_bn_by_isrsResult.BottleNeckType, nil
 	}
 
-	return storeBottlenecks(ctx, fetch, importID, conn, feedback)
+	return storeBottlenecks(
+		ctx, fetch, importID, conn, feedback, ubn.Tolerance)
 }