Mercurial > gemma
diff pkg/controllers/srimports.go @ 3945:3bdbaf1b282a
SR import: Negate the Z values in the XYZ files if the flag `negate-z` is set.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 14 Jul 2019 17:19:22 +0200 |
parents | 98d5dd2f0ca1 |
children | d668742c8978 |
line wrap: on
line diff
--- a/pkg/controllers/srimports.go Fri Jul 12 11:58:20 2019 +0200 +++ b/pkg/controllers/srimports.go Sun Jul 14 17:19:22 2019 +0200 @@ -97,6 +97,19 @@ sr.Bottleneck = &v } + if v := req.FormValue("negate-z"); v != "" { + var negateZ bool + switch strings.ToLower(v) { + case "true", "1": + negateZ = true + case "false", "0": + negateZ = false + default: + return fmt.Errorf("Unknown negate-z '%s'", v) + } + sr.NegateZ = negateZ + } + if v := req.FormValue("single-beam"); v != "" { var singleBeam bool switch strings.ToLower(v) {