report clipping that takes more than a minute
parent
97854f4277
commit
063c48b8c3
|
@ -9,6 +9,7 @@ import (
|
|||
"imposm3/proj"
|
||||
"imposm3/stats"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type RelationWriter struct {
|
||||
|
@ -103,11 +104,15 @@ NextRel:
|
|||
}
|
||||
|
||||
if rw.limiter != nil {
|
||||
start := time.Now()
|
||||
parts, err := rw.limiter.Clip(r.Geom.Geom)
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
continue NextRel
|
||||
}
|
||||
if duration := time.Now().Sub(start); duration > time.Minute {
|
||||
log.Warnf("clipping relation %d to -limitto took %s", r.Id, duration)
|
||||
}
|
||||
for _, g := range parts {
|
||||
rel := element.Relation(*r)
|
||||
rel.Geom = &element.Geometry{g, geos.AsEwkbHex(g)}
|
||||
|
|
Loading…
Reference in New Issue