mapbox / mbutil

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

Added support for creating an mbtile file from an ArcGIS server-generated image cache #44

Closed csomerlot closed 11 years ago

csomerlot commented 11 years ago

AGS caches use a different tiling scheme, so added that as a scheme option. One directional for now, added exception handling and debug logging to go with it.

tmcw commented 11 years ago

Hmm, this adds a lot of switches in that loop. Can you try refactoring this into two loops - one for ags-style, one for not - and the actual insertion into the db as a separate method?

csomerlot commented 11 years ago

Yep, I can do that, but for my own education, what is the objective, to made the code more readable?

tmcw commented 11 years ago

Yes, essentially - if there's a much-different directory structure, it makes sense to have a separate chunk of code for handling it.