only expire tiles when way/rel was inserted
parent
5f0d7ed3dd
commit
f65b23a1c7
|
@ -66,9 +66,6 @@ NextRel:
|
||||||
continue NextRel
|
continue NextRel
|
||||||
}
|
}
|
||||||
proj.NodesToMerc(m.Way.Nodes)
|
proj.NodesToMerc(m.Way.Nodes)
|
||||||
if rw.expireTiles != nil {
|
|
||||||
rw.expireTiles.ExpireFromNodes(m.Way.Nodes)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildRelation updates r.Members but we need all of them
|
// BuildRelation updates r.Members but we need all of them
|
||||||
|
@ -117,6 +114,13 @@ NextRel:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if rw.expireTiles != nil {
|
||||||
|
for _, m := range allMembers {
|
||||||
|
if m.Way != nil {
|
||||||
|
rw.expireTiles.ExpireFromNodes(m.Way.Nodes)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
geos.Destroy(r.Geom.Geom)
|
geos.Destroy(r.Geom.Geom)
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,19 +60,22 @@ func (ww *WayWriter) loop() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
proj.NodesToMerc(w.Nodes)
|
proj.NodesToMerc(w.Nodes)
|
||||||
if ww.expireTiles != nil {
|
|
||||||
ww.expireTiles.ExpireFromNodes(w.Nodes)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
inserted = false
|
||||||
if matches := ww.lineStringTagMatcher.Match(&w.Tags); len(matches) > 0 {
|
if matches := ww.lineStringTagMatcher.Match(&w.Tags); len(matches) > 0 {
|
||||||
ww.buildAndInsert(geos, w, matches, geom.LineString)
|
ww.buildAndInsert(geos, w, matches, geom.LineString)
|
||||||
|
inserted = true
|
||||||
}
|
}
|
||||||
if w.IsClosed() {
|
if w.IsClosed() {
|
||||||
if matches := ww.polygonTagMatcher.Match(&w.Tags); len(matches) > 0 {
|
if matches := ww.polygonTagMatcher.Match(&w.Tags); len(matches) > 0 {
|
||||||
ww.buildAndInsert(geos, w, matches, geom.Polygon)
|
ww.buildAndInsert(geos, w, matches, geom.Polygon)
|
||||||
|
inserted = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if inserted && ww.expireTiles != nil {
|
||||||
|
ww.expireTiles.ExpireFromNodes(w.Nodes)
|
||||||
|
}
|
||||||
if ww.diffCache != nil {
|
if ww.diffCache != nil {
|
||||||
ww.diffCache.Coords.AddFromWay(w)
|
ww.diffCache.Coords.AddFromWay(w)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue