mapbox / mapbox/tile-cover

Occasional bad tiles on random polygons

Open
#66 3 comments 0 reactions 0 assignees View on GitHub
bug in progress
Dominant language
JavaScript
Stars
196
Forks
41
PR merge metrics
No merged PRs in 30d

Description

@morganherlocker when feeding tile-cover with `require('geojson-random').polygon(10)`, it occasionally includes a bad tile that looks like this: `z: -24, x: -435.99999994039536, y: -1.9999999403953552`.

Looks like some backwards loop doesn't stop at 0 somewhere. It may be caused by polygons that exceed normally expected coords (-180..180, -85..85), but not sure.

This is the what caused [livetile](https://github.com/mapbox/livetile) builds to fail sporadically. cc @rclark

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with require('geojson-random').polygon(10) as input to tile-cover, then inspect the geometry traversal and backward loops involved in producing tiles. Done means random polygons no longer produce tiles with negative zoom or coordinates such as z: -24, x: -435.99999994039536, y: -1.9999999403953552.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.