-
Notifications
You must be signed in to change notification settings - Fork 0
/
geo.go
46 lines (36 loc) · 999 Bytes
/
geo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cli
import (
//"strings"
//"github.com/bozso/gotoolbox/cli"
//"github.com/bozso/gomma/data"
//"github.com/bozso/gomma/dem"
//"github.com/bozso/gomma/geo"
)
/*
type geoCode struct {
InFile, OutFile data.File
Mode string
dem.Lookup
geo.CodeOpt
}
func (g *geoCode) SetCli(c *cli.Cli) {
c.Var(&g.Lookup, "lookup", "Lookup table file.")
c.Var(&g.InFile, "infile", "Input datafile to geocode.")
c.Var(&g.OutFile, "outfile", "Geocoded output datafile.")
c.StringVar(&g.Mode, "mode", "",
"Geocoding direction; from or to radar cordinates.")
g.CodeOpt.SetCli(c)
}
func (c geoCode) Run() (err error) {
mode := strings.ToUpper(c.Mode)
switch mode {
case "TORADAR", "RADAR":
err = c.Lookup.geo2radar(c.InFile, c.OutFile, c.CodeOpt)
case "TOGEO", "GEO":
err = c.Lookup.radar2geo(c.InFile, c.OutFile, c.CodeOpt)
default:
err = UnrecognizedMode{name: "geocoding", got: mode}
}
return
}
*/