flush deltacoordscache after -read

master
Oliver Tonnhofer 2013-05-14 09:26:28 +02:00
parent aea54fd050
commit 84bc8e0fb1
2 changed files with 5 additions and 1 deletions

5
cache/delta.go vendored
View File

@ -103,12 +103,15 @@ func (self *DeltaCoordsCache) SetLinearImport(v bool) {
self.linearImport = v
}
func (self *DeltaCoordsCache) Close() {
func (self *DeltaCoordsCache) Flush() {
for bunchId, bunch := range self.table {
if bunch.needsWrite {
self.putCoordsPacked(bunchId, bunch.coords)
}
}
}
func (self *DeltaCoordsCache) Close() {
self.Flush()
self.Cache.Close()
}

View File

@ -224,6 +224,7 @@ func main() {
parse(osmCache, progress, mapping, *read)
osmCache.Coords.SetLinearImport(false)
progress.Reset()
osmCache.Coords.Flush()
}
if *write {