-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tilecover with the same min and max zoom creates unpredictable results #73
Comments
I came across a similar issue today with the following code snippet: // File: index.js
var feature = {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[77.3440933227539,13.239277104266526],[77.3440933227539,13.239611302005722],[77.34443664550781,13.239611302005722],[77.34443664550781,13.239277104266526],[77.3440933227539,13.239277104266526]]]},"properties":{}};
var tiles = tileCover.geojson(feature.geometry, {min_zoom: 25, max_zoom: 25});
console.log(JSON.stringify(tiles)); I ran the script and piped to tippecanoe and mbview. node index.js | tippecanoe -pf -pk -fo tileset.mbtiles && mbview tileset.mbtiles -q |
Added a fixture and a failing test case with: a8fdfe5. The idea behind the fixture is:
I am not sure if this fixture is helpful in creating a fix, but I am documenting it for reference. Input fixture on the left and output tiles on the right |
@bkowshik I think this can be an expected output — it may return adjacent tiles because the tile coordinate in mercator is unprojected to latitude/longitude bbox, which is subject to floating point precision errors, and then tiles that had a border exactly matching a tile side can start overlapping it slightly. However, the cases in the first two comments look like serious bugs. |
@bkowshik It looks like #73 (comment) is different from the original issue, and |
@tcql I can't reproduce the original issue with the following script — everything looks good: var tileCover = require('./');
var geojson = require('./test/fixtures/world/USA.geo.json');
var tiles = tileCover.geojson(geojson.features[0].geometry, {min_zoom: 7, max_zoom: 7});
console.log(JSON.stringify(tiles)); node debug.js | geojsonio Can you set up a broken test case? |
@mourner Yes, it looks like the misaligned grid is probably from Tippecanoe tiny polygon reduction and could be eliminated with |
@tcql I have to close this as not reproducible on the tile-cover side. Please feel free to reopen after we have a reproducible test case. |
trying to cover the US with
min_zoom:7, max_zoom: 7
- no coastal tiles, and lots of scattered random onesif I generate tiles with
min_zoom: 6, max_zoom: 7
then use tilebelt to get the child-tiles for z6 tiles, I get what I was expectingInterestingly, both runs result in the same number of tiles, which suggests there's just some data flow issue where the coastal tiles get their coordinates scrambled up
The text was updated successfully, but these errors were encountered: