mapbox / mbutil

Importer and Exporter of MBTiles
http://mapbox.com/developers/
BSD 3-Clause "New" or "Revised" License
755 stars 198 forks source link

Patch lean grids #58

Closed mikejcorey closed 7 years ago

mikejcorey commented 10 years ago

Here's a shot at basing what grids get exported dependent on the tiles routine. Rather than doing one query for all grids, which results in lots of empty grids in tilesets where there are a lot of areas without tiles, this version runs a separate write_grid function each time a tile is created. This creates many more queries, but I didn't see much if any decrease in exporting performance at the 50k-100k tile range. And any slowdown is more than made up for by not having to export and upload empty tiles.

mikejcorey commented 10 years ago

I think the test is failing because it's trying to generate a utf grid for a tile that might not exist. Does that seem correct?

ghost commented 9 years ago

Hi mikejcorey, I have not checked the MBTiles that is used for the test but here is the code of the test that breaks! EDIT: when looking at the MBTiles called utf8grid.mbtiles that is used for this test, it appears that it contains one tile and the corresponding grid, so I think you are wrong... Moreover, I saw you removed the line to control the callback of the UTFGrids, you should not (more info here). ;)

springmeyer commented 9 years ago

tests are failing for this pull. @mikejcorey or @vross - are you able to rebase and get them working?

mikejcorey commented 9 years ago

I didn't want to mess with the tests without consulting with people with a wider range of experience. But my impression is that it's failing because it assumes there will be a grid at 0/0/0, which may or may not be true when the code only makes grids where there is grid data.

Or I just screwed something up. Happy to do what I can, but might be a week or so before I can get to it -- crashing on the final versions of the project this is for.

On 10/02/2014 11:06 AM, Dane Springmeyer wrote:

tests are failing for this pull. @mikejcorey https://github.com/mikejcorey or @vross https://github.com/vross - are you able to rebase and get them working?

— Reply to this email directly or view it on GitHub https://github.com/mapbox/mbutil/pull/58#issuecomment-57674315.

perrygeo commented 7 years ago

@mikejcorey any action here? I'm going to close since it's been a few years but if you've got a working branch, feel free to reopen.