comparison pkg/mesh/polygon.go @ 5490:5f47eeea988d logging

Use own logging package.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 20 Sep 2021 17:45:39 +0200
parents 866eae1bd888
children 1222b777f51f
comparison
equal deleted inserted replaced
5488:a726a92ea5c9 5490:5f47eeea988d
15 15
16 import ( 16 import (
17 "bytes" 17 "bytes"
18 "encoding/binary" 18 "encoding/binary"
19 "fmt" 19 "fmt"
20 "log"
21 "math" 20 "math"
22 21
23 "github.com/tidwall/rtree" 22 "github.com/tidwall/rtree"
24 23
24 "gemma.intevation.de/gemma/pkg/log"
25 "gemma.intevation.de/gemma/pkg/wkb" 25 "gemma.intevation.de/gemma/pkg/wkb"
26 ) 26 )
27 27
28 type ( 28 type (
29 ring []float64 29 ring []float64
462 return err 462 return err
463 } 463 }
464 464
465 rngs := make([]ring, numRings) 465 rngs := make([]ring, numRings)
466 466
467 log.Printf("info: Number of rings: %d\n", len(rngs)) 467 log.Infof("number of rings: %d\n", len(rngs))
468 468
469 for rng := uint32(0); rng < numRings; rng++ { 469 for rng := uint32(0); rng < numRings; rng++ {
470 var numVertices uint32 470 var numVertices uint32
471 if err = binary.Read(r, order, &numVertices); err != nil { 471 if err = binary.Read(r, order, &numVertices); err != nil {
472 return err 472 return err
473 } 473 }
474 474
475 log.Printf("info: Number of vertices in ring %d: %d\n", rng, numVertices) 475 log.Infof("number of vertices in ring %d: %d\n", rng, numVertices)
476 476
477 numVertices *= 2 477 numVertices *= 2
478 vertices := make([]float64, numVertices) 478 vertices := make([]float64, numVertices)
479 479
480 for v := uint32(0); v < numVertices; v += 2 { 480 for v := uint32(0); v < numVertices; v += 2 {