comparison pkg/imports/sr.go @ 1900:6a67cd819e93

To prepare stretch import made some model data types re-usable.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Jan 2019 15:04:53 +0100
parents 09349ca27dd7
children 59055c8301df
comparison
equal deleted inserted replaced
1899:272133cd65da 1900:6a67cd819e93
46 // 'sr.zip' is expect to be. 46 // 'sr.zip' is expect to be.
47 Dir string `json:"dir"` 47 Dir string `json:"dir"`
48 48
49 // Override data 49 // Override data
50 // Date if given overrides the date value from the meta.json. 50 // Date if given overrides the date value from the meta.json.
51 Date *models.SoundingResultDate `json:"date,omitempty"` 51 Date *models.Date `json:"date,omitempty"`
52 // Date if given overrides the name of the bottleneck from the meta.json. 52 // Date if given overrides the name of the bottleneck from the meta.json.
53 Bottleneck *string `json:"bottleneck,omitempty"` 53 Bottleneck *string `json:"bottleneck,omitempty"`
54 // EPSG if given overrides the EPSG code from the meta.json. 54 // EPSG if given overrides the EPSG code from the meta.json.
55 // Defaults to WGS84. 55 // Defaults to WGS84.
56 EPSG *uint `json:"epsg,omitempty"` 56 EPSG *uint `json:"epsg,omitempty"`
309 if err = tx.Commit(); err == nil { 309 if err = tx.Commit(); err == nil {
310 feedback.Info("Storing sounding result was successful.") 310 feedback.Info("Storing sounding result was successful.")
311 } 311 }
312 312
313 summary := struct { 313 summary := struct {
314 Bottleneck string `json:"bottleneck"` 314 Bottleneck string `json:"bottleneck"`
315 Date models.SoundingResultDate `json:"date"` 315 Date models.Date `json:"date"`
316 Lat float64 `json:"lat"` 316 Lat float64 `json:"lat"`
317 Lon float64 `json:"lon"` 317 Lon float64 `json:"lon"`
318 }{ 318 }{
319 Bottleneck: m.Bottleneck, 319 Bottleneck: m.Bottleneck,
320 Date: m.Date, 320 Date: m.Date,
321 Lat: lat, 321 Lat: lat,
322 Lon: lon, 322 Lon: lon,