Skip to content

Commit 4d1c99f

Browse files
authored
Fix addressed tiles calculation (#270)
The addressed tiles is the sum of all tile runlengths. Compare with pmtiles/verify.go:112.
1 parent 10f1d3d commit 4d1c99f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pmtiles/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (r *resolver) NumContents() uint64 {
4545

4646
// must be called in increasing tile_id order, uniquely
4747
func (r *resolver) AddTileIsNew(tileID uint64, data []byte, runLength uint32) (bool, []byte) {
48-
r.AddressedTiles++
48+
r.AddressedTiles += uint64(runLength)
4949
var found offsetLen
5050
var ok bool
5151
var sumString string

0 commit comments

Comments
 (0)