This commit is contained in:
nuknal
2024-09-10 14:13:30 +08:00
parent 52638b5ffe
commit 2fcbc389c6
8 changed files with 82 additions and 32 deletions

View File

@@ -11,6 +11,7 @@ type Config struct {
BrowserImg BrowserImgConfig `yaml:"browser_img" mapstructure:"browser_img"`
Log LogConfig `yaml:"log" mapstructure:"log"`
Dem DemConfig `yaml:"dem" mapstructure:"dem"`
RPC RPCConfig `yaml:"rpc" mapstructure:"rpc"`
}
type LogConfig struct {
@@ -52,6 +53,12 @@ type BrowserImgConfig struct {
CumulativeCutUpper float64 `yaml:"cumulative_cut_upper" mapstructure:"cumulative_cut_upper"`
}
type RPCConfig struct {
GridSize int `yaml:"grid_size" mapstructure:"grid_size"`
AltitudeRange int `yaml:"altitude_range" mapstructure:"altitude_range"`
AltitudeLayer int `yaml:"altitude_layer" mapstructure:"altitude_layer"`
}
var GCONFIG Config
func init() {
@@ -94,5 +101,10 @@ func init() {
DemDir: "dem/SRTM",
Dem1Km: "dem/gdlebm.tif",
},
RPC: RPCConfig{
GridSize: 3,
AltitudeRange: 1000,
AltitudeLayer: 5,
},
}
}