felt/tippecanoe

Internal error: 745 shards not a power of 2

victoraalvarez opened this issue · 2 comments

When trying to convert my GeoJSONs to tiles, I get the error Internal error: 745 shards not a power of 2.

Merging string pool
Merging vertices
Read 0.01 million features
Reordering geometry: 25%
Reordering geometry: 79%
19080 features, 555606 bytes of geometry and attributes, 19945 bytes of string pool, 0 bytes of vertices, 0 bytes of nodes
Internal error: 745 shards not a power of 2

My tiles end up empty at only 28kb. I'm using Tippecanoe with Ubuntu on Docker. I haven't gotten this issue before but it's suddenly coming up even though nothing has changed with my installation. I'm calling Tippecanoe from Python subprocess using the command below:

subprocess.run(['tippecanoe',
                '-Z', str(zoom_range[0]),
                '-z', str(zoom_range[1]),
                '-B' + str(zoom_range[0]),
                '-as',
                '-ad',
                '-an',
                '-ac',
                '-pi',
                '-aN',
                '-aD',
                '-aS',
                '-ao',
                '-S', str(tile_simplification),
                '--drop-polygons',
                '--force',
                '-o',vector_tile, 
                vector_file])

Not sure where to go from here and there doesn't seem to be much online about this issue, any tips on debugging?

Thanks for the report! I'm not sure exactly why this is happening but some extra information would help. Would you mind building tippecanoe from #220, rerunning your tiling, and sending me the extra log output that you get? On my laptop I get:

Using 32 temporary files and 1 threads on 8 CPUS for 32 child shards
Using 32 temporary files and 4 threads on 8 CPUS for 8 child shards
Using 32 temporary files and 8 threads on 8 CPUS for 4 child shards
Using 32 temporary files and 8 threads on 8 CPUS for 4 child shards
Using 32 temporary files and 8 threads on 8 CPUS for 4 child shards
Using 32 temporary files and 8 threads on 8 CPUS for 4 child shards

but there must be a miscalculation somewhere based on how many CPUs your computer has and how many files it allows open at once.

Thanks for your reply! Unfortunately, I wasn't able to build it successfully and ran into a couple of errors in the process. However, for context, Tippecanoe is running on a Kubernetes node which means it has access to shared CPU which is quite large. With the way Kubernetes works, I don't think the size of the CPU is also going to be guaranteed a power of 2 which would explain the error. I'll keep trying to build it and comment again if I can get that extra logging.