comparison pkg/imports/isr.go @ 4640:fb09a43b062e

Decouple the tracing of the iso areas from the octree data structure.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 11 Oct 2019 20:09:37 +0200
parents c657dec6b0fa
children 4bbfe3dd2ab5
comparison
equal deleted inserted replaced
4639:4380f5483c03 4640:fb09a43b062e
182 if _, err := tx.ExecContext(ctx, deleteIsoAreasSQL, sr); err != nil { 182 if _, err := tx.ExecContext(ctx, deleteIsoAreasSQL, sr); err != nil {
183 return err 183 return err
184 } 184 }
185 185
186 // Calculate and store the iso areas. 186 // Calculate and store the iso areas.
187 areas := tree.TraceAreas(hs, isoCellSize) 187 areas := octree.TraceAreas(hs, isoCellSize, tree.Min, tree.Max, tree.Value)
188 for i, a := range areas { 188 for i, a := range areas {
189 if len(a) == 0 { 189 if len(a) == 0 {
190 continue 190 continue
191 } 191 }
192 if _, err := insertAreasStmt.ExecContext( 192 if _, err := insertAreasStmt.ExecContext(