systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.48k stars 230 forks source link

Negative values for tile_row #506

Closed tim-terry-otm closed 1 year ago

tim-terry-otm commented 1 year ago

I'm trying to get to the bottom of an error whilst converting mbtiles to pmtiles. It seems my mbtiles file has some negative row values for zoom level 4

select tile_row from tiles where zoom_level = 4 and tile_column = 8;

-48
-1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Why would these occur?

The mbtiles file and the script used to generate it can be seen here: https://github.com/protomaps/go-pmtiles/issues/56

systemed commented 1 year ago

Not something I've seen before. I wonder if there's some weird data in the planet that's breaking the projection.

tim-terry-otm commented 1 year ago

Thanks, i worked around the issue by just deleting the odd rows with

DELETE FROM tiles WHERE tile_row < 0

I checked the tilemaker source, but found not mention of rows with -48, the data for these rows was empty. So guessing they were created when some warnings were fixed during generation.