Skip to content

Commit

Permalink
convert: don't crash on empty mbtiles [#41]
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Sep 12, 2023
1 parent 57b82de commit 157c08d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pmtiles/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ func ConvertMbtiles(logger *log.Logger, input string, output string, deduplicate
}
}

if tileset.GetCardinality() == 0 {
return fmt.Errorf("No tiles in MBTiles archive.")
}

logger.Println("Pass 2: writing tiles")
resolver := NewResolver(deduplicate, header.TileType == Mvt)
{
Expand Down

0 comments on commit 157c08d

Please sign in to comment.