open-city / edifice-maps-tilemill

TileMill projects for Edifice maps.
2 stars 3 forks source link

Write script to upload tiles to s3 #2

Open jpvelez opened 10 years ago

jpvelez commented 10 years ago

Write script that uses s3cmd (command line utility) or boto (python library) to upload unpacked map map (png) and utfgrid (json) tiles to S3.

mbtiles unpacks tiles to /map_name/z/x/y/file.format.

This is a Good Thing, because that's the format the the tilejson file that loads the tiles on the client side expects:

http://a.tiles.mapbox.com/v4/jpvelez.new_demo_permits/{z}/{x}/{y}.grid.json

s3 doesn't have folders. But you can simulate them by hacking the filename. So it the resulting s3 files should be accessible at

http:////.format

Let me know if this doesn't make sense, @maschinenmensch

derekeder commented 10 years ago

@jpvelez FYI S3 does have folders so you can generate the tiles normally.

On Sun, Sep 7, 2014 at 4:35 PM, Juan-Pablo Velez notifications@github.com wrote:

Write script that uses s3cmd (command line utility) or boto (python library) to upload unpacked map map (png) and utfgrid (json) tiles to S3.

mbtiles unpacks tiles to /map_name/z/x/y/file.format.

This is a Good Thing, because that's the format the the tilejson file https://api.tiles.mapbox.com/v4/jpvelez.new_demo_permits.json?access_token=pk.eyJ1IjoianB2ZWxleiIsImEiOiJDMExQLXpBIn0.WMvQXeb5ljr4yUJhacAcrg that loads the tiles on the client side expects:

http://a.tiles.mapbox.com/v4/jpvelez.new_demo_permits/{z}/{x}/{y}.grid.json

s3 doesn't have folders. But you can simulate them by hacking the filename. So it the resulting s3 files should be accessible at

http:////.format

Let me know if this doesn't make sense, @maschinenmensch https://github.com/maschinenmensch

— Reply to this email directly or view it on GitHub https://github.com/open-city/edifice-maps-tilemill/issues/2.

Derek Eder @derekeder https://twitter.com/#!/derekeder derekeder.com derek.eder@gmail.com

jpvelez commented 9 years ago

@maschinenmensch Bueller?