Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46786
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <embrujada_w@hotmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'filename:fname piece:py': 0.07; 'json': 0.07; 'mouse': 0.07; 'referring': 0.07; 'string': 0.09; 'cursor': 0.09; 'except:': 0.09; 'grid': 0.09; 'try:': 0.09; 'wrapped': 0.09; 'python': 0.11; 'def': 0.12; 'stored': 0.12; '(also': 0.16; '(x,': 0.16; '39,': 0.16; 'appear.': 0.16; 'coordinates': 0.16; 'empty.': 0.16; 'file).': 0.16; 'formatted': 0.16; 'normally,': 0.16; 'other,': 0.16; 'permits': 0.16; 'res': 0.16; 'res:': 0.16; 'sqlite': 0.16; 'url:json': 0.16; '(you': 0.16; 'url:)': 0.16; '(not': 0.18; 'command': 0.22; 'appears': 0.22; 'example': 0.22; 'import': 0.22; 'previously': 0.22; 'to:name:python-list@python.org': 0.22; 'print': 0.22; 'error': 0.23; 'format,': 0.24; 'headers': 0.24; 'string,': 0.24; 'file.': 0.24; 'idea': 0.28; 'point': 0.28; 'function': 0.29; 'database,': 0.30; 'code': 0.31; 'getting': 0.31; "skip:' 10": 0.31; 'extract': 0.31; 'keys': 0.31; 'file': 0.32; 'compatible': 0.32; 'url:python': 0.33; 'skip:# 10': 0.33; 'table': 0.34; 'subject:from': 0.34; 'info': 0.35; 'display': 0.35; 'connection': 0.35; 'skip:s 30': 0.35; 'but': 0.35; 'there': 0.35; 'returning': 0.36; 'skip:j 20': 0.36; 'done': 0.36; 'shows': 0.36; 'url:org': 0.36; 'two': 0.37; 'server': 0.38; 'url:library': 0.38; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'is.': 0.60; 'skip:z 20': 0.60; 'information,': 0.61; 'show': 0.63; 'information': 0.63; 'map': 0.64; 'taking': 0.65; 'charset:windows-1252': 0.65; 'url:png': 0.68; 'url:17': 0.68; 'containing': 0.69; 'url:4': 0.69; 'apart': 0.72; 'url:a': 0.72; 'url:page': 0.74; 'comment.': 0.84; 'tiles': 0.84; 'together,': 0.84; 'url:74': 0.84; 'url:14': 0.95 |
| X-TMN | [gBMttloaQnpmcCOra7i+s92i0XUmRrAzriHC4FA8HjQ=] |
| X-Originating-Email | [embrujada_w@hotmail.com] |
| Content-Type | multipart/mixed; boundary="_fe499687-3f2b-47b6-aa9c-1452143f2d0c_" |
| From | Carmen Campos Bordons <embrujada_w@hotmail.com> |
| To | "python-list@python.org" <python-list@python.org> |
| Subject | Extract UTFGrid from MBTiles database |
| Date | Mon, 3 Jun 2013 12:02:37 +0000 |
| Importance | Normal |
| MIME-Version | 1.0 |
| X-OriginalArrivalTime | 03 Jun 2013 12:02:37.0957 (UTC) FILETIME=[3DBAF350:01CE6052] |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2592.1370261027.3114.python-list@python.org> (permalink) |
| Lines | 248 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1370261027 news.xs4all.nl 15883 [2001:888:2000:d::a6]:47662 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46786 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
I would appreciate any help or comment. The idea is to create a server in python that serves maps on the internet. The maps have to be in MBTiles format, which is a SQLite database that store all the map tiles in a single file. Taking this as an example http://a.tiles.mapbox.com/v3/mapbox.geography-class/page.html#4.00/36.74/28.30 The tiles are images of the map in png, like this one http://a.tiles.mapbox.com/v3/mapbox.geography-class/4/7/7.png and apart from the tiles, in the database is stored the UTFGrid information, like this file http://a.tiles.mapbox.com/v3/mapbox.geography-class/4/7/7.grid.json. The UTFGrid (you can consult in http://www.mapbox.com/developers/utfgrid/) permits than when you hover in the map, some extra information appears referring to the point where the mouse is. As you can see in this example http://a.tiles.mapbox.com/v3/mapbox.geography-class/page.html#4.00/36.74/28.30 a infobox appears with the flag of every country(which is the information stored in the UTFGrid file). In the MBTiles database there are two table (also other, but not important in this case): “tiles”, where are stored the tiles; and “grids”, where is stored the UTFGrid associated to every tile. >From the MBTiles I can extract the tiles and display a normal map, and I can also extract the UTFGrid file individually (not all together, like the tiles that I can see the whole map; with the UTFGrid I just get one file). When I show the map normally, the infoboxes do not appear. But I do not get any error in command line or in the website. It just like the UTFGrid is empty. Attached is the code I am using to access the MBtiles file. I am using this SQL to access the MBTiles file “select grid from grids where tile_column=? and tile_row=? and zoom_level=?", (x, y, z) And if I change it for this "select grid from grids where tile_column=? and tile_row=? and zoom_level=?", (67, 84, 7) I am getting always the same UTFGrid, but in this case it shows the infoboxes on the map, that one for all the tiles. It is like if I have this part of the map http://a.tiles.mapbox.com/v3/mapbox.geography-class/page.html#4.00/10.14/17.31 but I always get the infoboxes of this tile http://a.tiles.mapbox.com/v3/mapbox.geography-class/4/7/7.png I get the infoboxes in all the tiles, but all of them are showing the flag of that tile. Thanks,Carmen
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Extract UTFGrid from MBTiles database Carmen Campos Bordons <embrujada_w@hotmail.com> - 2013-06-03 12:02 +0000
csiph-web