Mercurial > gemma
annotate pkg/imports/isr.go @ 5435:351d38269e4e marking-single-beam
Display of the according type of sounding data in legend.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 13 Jul 2021 10:59:22 +0200 |
parents | fc79622783a7 |
children | a65b0891e8fd |
rev | line source |
---|---|
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 // This is Free Software under GNU Affero General Public License v >= 3.0 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 // without warranty, see README.md and license for details. |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 // |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 // SPDX-License-Identifier: AGPL-3.0-or-later |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 // License-Filename: LICENSES/AGPL-3.0.txt |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 // |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 // Copyright (C) 2018 by via donau |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 // – Österreichische Wasserstraßen-Gesellschaft mbH |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 // Software engineering by Intevation GmbH |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 // |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 // Author(s): |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de> |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 package imports |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 import ( |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 "context" |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 "database/sql" |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
19 "log" |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 "time" |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 |
4827
f4abfd0ee8ad
Renamed octree package to mesh as there is no octree any more.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4768
diff
changeset
|
22 "gemma.intevation.de/gemma/pkg/mesh" |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
23 "gemma.intevation.de/gemma/pkg/models" |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 ) |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 |
4852
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4827
diff
changeset
|
26 // IsoRefresh is an import job to refresh the pre-calculated |
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4827
diff
changeset
|
27 // iso morphology data when the class breaks were changed. |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 type IsoRefresh struct { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 ClassBreaks string `json:"class-breaks"` |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 // ISRJobKind is the unique name of this import job type. |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 const ISRJobKind JobKind = "isr" |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 func init() { RegisterJobCreator(ISRJobKind, isrJobCreator{}) } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 type isrJobCreator struct{} |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 func (isrJobCreator) Description() string { return "refresh iso lines" } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 func (isrJobCreator) AutoAccept() bool { return true } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 func (isrJobCreator) Create() Job { return new(IsoRefresh) } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 |
5035
56c589f7435d
Enhance comments on implementations of StageDone()
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
45 // StageDone is a NOP for IsoRefresh imports. |
5034
59a99655f34d
Added feedback support for StageDone.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4852
diff
changeset
|
46 func (isrJobCreator) StageDone(context.Context, *sql.Tx, int64, Feedback) error { |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 return nil |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
49 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 func (isrJobCreator) Depends() [2][]string { |
4571
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
51 return srJobCreator{}.Depends() |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 const ( |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 fetchSoundingResultsIDsSQL = ` |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
56 SELECT |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
57 bottleneck_id, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
58 id, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
59 surtyp |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 FROM waterway.sounding_results |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
61 ORDER BY bottleneck_id` |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
62 |
4571
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
63 deleteIsoAreasSQL = ` |
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
64 DELETE FROM waterway.sounding_results_iso_areas |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
65 WHERE sounding_result_id = $1` |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
66 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
67 fetchMarkingPointsSQL = ` |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
68 SELECT ST_AsBinary(ST_Transform(points, 4326)) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
69 FROM waterway.sounding_results_marking_points |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
70 WHERE sounding_result_id = $1` |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
71 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
72 deleteMarkingPointsSQL = ` |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
73 DELETE FROM waterway.sounding_results_marking_points |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
74 WHERE sounding_result_id = $1` |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 ) |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 |
4852
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4827
diff
changeset
|
77 // CleanUp of a iso refresh import is a NOP. |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 func (isr *IsoRefresh) CleanUp() error { return nil } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
80 type ( |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
81 scanResult struct { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
82 id int64 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
83 surveyType models.SurveyType |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
84 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
85 bottleneckSoundingResults struct { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
86 bn string |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
87 srs []scanResult |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
88 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
89 ) |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 func fetchBottleneckResults( |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 ctx context.Context, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 conn *sql.Conn, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 ) ([]bottleneckSoundingResults, error) { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 rows, err := conn.QueryContext(ctx, fetchSoundingResultsIDsSQL) |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 if err != nil { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 return nil, err |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 defer rows.Close() |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
102 var bsrs []bottleneckSoundingResults |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 for rows.Next() { |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
105 var ( |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
106 bn string |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
107 id int64 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
108 st string |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
109 ) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
110 if err := rows.Scan(&bn, &id, &st); err != nil { |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 return nil, err |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 } |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
113 sr := scanResult{id: id, surveyType: models.SurveyType(st)} |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
114 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
115 if l := len(bsrs); l == 0 || bsrs[l-1].bn != bn { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
116 bsrs = append(bsrs, bottleneckSoundingResults{ |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
117 bn: bn, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
118 srs: []scanResult{sr}, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
119 }) |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
120 } else { |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
121 bsrs[l-1].srs = append(bsrs[l-1].srs, sr) |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
122 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
123 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
124 if err := rows.Err(); err != nil { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
125 return nil, err |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
126 } |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
127 return bsrs, nil |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
128 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 |
4767
f66e5b2fa894
Wording: Speak of iso areas instead of iso lines when refreshing the sounding results after a configuration change.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4669
diff
changeset
|
130 // Do executes the actual refreshing of the iso areas. |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 func (isr *IsoRefresh) Do( |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 ctx context.Context, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 importID int64, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
134 conn *sql.Conn, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 feedback Feedback, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 ) (interface{}, error) { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 start := time.Now() |
4767
f66e5b2fa894
Wording: Speak of iso areas instead of iso lines when refreshing the sounding results after a configuration change.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4669
diff
changeset
|
139 feedback.Info("Regenerating iso areas for sounding results " + |
4255
d69a3b19a1ae
Indicate to the user what triggered the import
Tom Gottfried <tom@intevation.de>
parents:
4220
diff
changeset
|
140 "after configuration change") |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 defer func() { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
142 feedback.Info( |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
143 "Processing all sounding results took %v.", |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
144 time.Since(start)) |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
145 }() |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
146 |
4827
f4abfd0ee8ad
Renamed octree package to mesh as there is no octree any more.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4768
diff
changeset
|
147 heights, err := mesh.ParseClassBreaks(isr.ClassBreaks) |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
148 if err != nil { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
149 return nil, err |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
150 } |
5428
b8d5f1cd15fb
Simplified classification. Needs testing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5421
diff
changeset
|
151 heights = heights.Dedup() |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
153 bns, err := fetchBottleneckResults(ctx, conn) |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
154 if err != nil { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
155 return nil, err |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
156 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
157 |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
158 isrs, err := newISRStmts(ctx, conn) |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
159 if err != nil { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
160 return nil, err |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
161 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
162 defer isrs.close() |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
163 |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
164 for i := range bns { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
165 start := time.Now() |
4216
cbc75527916f
Refresh iso contour lines import: Improved logging a bit.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4215
diff
changeset
|
166 feedback.Info("Processing bottleneck '%s' ...", bns[i].bn) |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
167 err := isr.processBottleneck( |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
168 ctx, conn, isrs, |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
169 heights, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 &bns[i], |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
171 ) |
4216
cbc75527916f
Refresh iso contour lines import: Improved logging a bit.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4215
diff
changeset
|
172 feedback.Info("Processing took %v.", time.Since(start)) |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
173 if err != nil { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
174 return nil, err |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
175 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
176 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
177 |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
178 return nil, nil |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
179 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
180 |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
181 type isrStmts struct { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
182 insertAreas *sql.Stmt |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
183 deleteAreas *sql.Stmt |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
184 fetchMarkingPoints *sql.Stmt |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
185 deleteMarkingPoints *sql.Stmt |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
186 insertMarkingPoints *sql.Stmt |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
187 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
188 |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
189 func newISRStmts(ctx context.Context, conn *sql.Conn) (*isrStmts, error) { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
190 var isrs isrStmts |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
191 for _, x := range []struct { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
192 stmt **sql.Stmt |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
193 query string |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
194 }{ |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
195 {&isrs.insertAreas, insertIsoAreasSQL}, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
196 {&isrs.deleteAreas, deleteIsoAreasSQL}, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
197 {&isrs.fetchMarkingPoints, fetchMarkingPointsSQL}, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
198 {&isrs.deleteMarkingPoints, deleteMarkingPointsSQL}, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
199 {&isrs.insertMarkingPoints, insertMarkingPointsSQL}, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
200 } { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
201 var err error |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
202 if *x.stmt, err = conn.PrepareContext(ctx, x.query); err != nil { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
203 isrs.close() |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
204 return nil, err |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
205 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
206 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
207 return &isrs, nil |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
208 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
209 |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
210 func (isrs *isrStmts) close() { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
211 for _, x := range []**sql.Stmt{ |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
212 &isrs.insertAreas, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
213 &isrs.deleteAreas, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
214 &isrs.fetchMarkingPoints, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
215 &isrs.deleteMarkingPoints, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
216 &isrs.insertMarkingPoints, |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
217 } { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
218 if *x != nil { |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
219 (*x).Close() |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
220 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
221 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
222 } |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
223 |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
224 func (isr *IsoRefresh) processBottleneck( |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
225 ctx context.Context, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
226 conn *sql.Conn, |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
227 isrs *isrStmts, |
5412
34bc6041e61e
Added a type for class breaks.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5035
diff
changeset
|
228 heights mesh.ClassBreaks, |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
229 bn *bottleneckSoundingResults, |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
230 ) error { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
231 // Do one transaction per bottleneck. |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
232 tx, err := conn.BeginTx(ctx, nil) |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
233 if err != nil { |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
234 return nil |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
235 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
236 defer tx.Rollback() |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
237 |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
238 var ( |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
239 insertAreas = tx.StmtContext(ctx, isrs.insertAreas) |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
240 deleteAreas = tx.StmtContext(ctx, isrs.deleteAreas) |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
241 fetchMarkingPoints = tx.StmtContext(ctx, isrs.fetchMarkingPoints) |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
242 deleteMarkingPoints = tx.StmtContext(ctx, isrs.deleteMarkingPoints) |
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
243 insertMarkingPoints = tx.StmtContext(ctx, isrs.insertMarkingPoints) |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
244 ) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
245 |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
246 // For all sounding results in bottleneck. |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
247 for _, sr := range bn.srs { |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
248 switch sr.surveyType { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
249 case models.SurveyTypeMarking: |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
250 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
251 // Read all points back in. |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
252 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
253 var points mesh.MultiPointZ |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
254 |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
255 if err := func() error { |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
256 rows, err := fetchMarkingPoints.QueryContext(ctx, sr.id) |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
257 if err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
258 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
259 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
260 defer rows.Close() |
4571
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
261 |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
262 for rows.Next() { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
263 var buf []byte |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
264 if err := rows.Scan(&buf); err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
265 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
266 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
267 var npoints mesh.MultiPointZ |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
268 if err := npoints.FromWKB(buf); err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
269 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
270 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
271 points = append(points, npoints...) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
272 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
273 return rows.Err() |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
274 }(); err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
275 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
276 } |
4768
a2f16bbcc846
Morph differences: Directly raster A and subtract B as a raster.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4767
diff
changeset
|
277 |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
278 // Delete old points |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
279 if _, err := deleteMarkingPoints.ExecContext(ctx, sr.id); err != nil { |
4571
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
280 return err |
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
281 } |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
282 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
283 // Re-classify points. |
5428
b8d5f1cd15fb
Simplified classification. Needs testing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5421
diff
changeset
|
284 classes := heights.Classify(points) |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
285 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
286 // Re-insert points |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
287 for i, class := range classes { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
288 // Ignore empty classes |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
289 if len(class) == 0 { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
290 continue |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
291 } |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
292 if _, err := insertMarkingPoints.ExecContext( |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
293 ctx, sr.id, heights[i], 4326, class.AsWKB(), |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
294 ); err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
295 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
296 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
297 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
298 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
299 case models.SurveyTypeMultiBeam, models.SurveyTypeSingleBeam: |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
300 tree, err := mesh.FetchMeshDirectly(ctx, tx, sr.id) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
301 if err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
302 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
303 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
304 hs := heights.ExtrapolateClassBreaks(tree.Min().Z, tree.Max().Z).Dedup() |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
305 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
306 // Delete the old iso areas. |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
307 if _, err := deleteAreas.ExecContext(ctx, sr); err != nil { |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
308 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
309 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
310 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
311 // Calculate and store the iso areas. |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
312 box := mesh.Box2D{ |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
313 X1: tree.Min().X, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
314 Y1: tree.Min().Y, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
315 X2: tree.Max().X, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
316 Y2: tree.Max().Y, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
317 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
318 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
319 raster := mesh.NewRaster(box, isoCellSize) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
320 raster.Rasterize(tree.Value) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
321 areas := raster.Trace(hs) |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
322 |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
323 for i, a := range areas { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
324 if len(a) == 0 { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
325 continue |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
326 } |
5431
fc79622783a7
ISR job: Moved statement preparations out out bottleneck processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5428
diff
changeset
|
327 if _, err := insertAreas.ExecContext( |
5421
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
328 ctx, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
329 sr, hs[i], tree.EPSG(), |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
330 a.AsWKB(), |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
331 contourTolerance, |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
332 ); err != nil { |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
333 return err |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
334 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
335 } |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
336 default: |
c9da747d4109
Extended ISR import job to handle marking scans as well.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
5412
diff
changeset
|
337 log.Printf("error: unknown survey type '%s'\n", sr.surveyType) |
4571
a413b4a89bcc
Update areas if config has changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4257
diff
changeset
|
338 } |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
339 } |
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
340 |
4220
d8b736ba3f32
Refresh iso contour lines import: Commit the changes!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4216
diff
changeset
|
341 return tx.Commit() |
4214
49564382ffff
Added a import queue job to recalculate the contour lines of the sounding results if the heights have changed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
342 } |