comparison 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
comparison
equal deleted inserted replaced
3944:0ed8af02d5a9 3945:3bdbaf1b282a
93 sr.DepthReference = &v 93 sr.DepthReference = &v
94 } 94 }
95 95
96 if v := req.FormValue("bottleneck"); v != "" { 96 if v := req.FormValue("bottleneck"); v != "" {
97 sr.Bottleneck = &v 97 sr.Bottleneck = &v
98 }
99
100 if v := req.FormValue("negate-z"); v != "" {
101 var negateZ bool
102 switch strings.ToLower(v) {
103 case "true", "1":
104 negateZ = true
105 case "false", "0":
106 negateZ = false
107 default:
108 return fmt.Errorf("Unknown negate-z '%s'", v)
109 }
110 sr.NegateZ = negateZ
98 } 111 }
99 112
100 if v := req.FormValue("single-beam"); v != "" { 113 if v := req.FormValue("single-beam"); v != "" {
101 var singleBeam bool 114 var singleBeam bool
102 switch strings.ToLower(v) { 115 switch strings.ToLower(v) {