rishabht1 / gmapcatcher

Automatically exported from code.google.com/p/gmapcatcher
0 stars 0 forks source link

What does output directory mean after downloading? #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just downloaded the tiles of OpenStreetMap, and the downloaded pngs are 
organized in a four-level directory such as "osmTiles\5\3\239\1\959.png". I 
only know that 5 is the zoom level and leave others unknown. Could you please 
explain about it? And how can I get row and col number of a tile?

Original issue reported on code.google.com by jun....@bhi-technologies.com on 29 Aug 2010 at 6:40

GoogleCodeExporter commented 9 years ago

#  file = C:\Users\Dog\.googlemaps\tiles\-1\74\541\96\982.png
# coord = 74*1024 + 541,   96*1024 + 982,   -1

for more details see:
http://code.google.com/p/gmapcatcher/source/browse/trunk/gmapcatcher/tilesRepoFS
.py?r=969#104

I hope that helps...

Original comment by heldersepu on 30 Aug 2010 at 12:04

GoogleCodeExporter commented 9 years ago
Thanks, mate. That really helps me a lot.

Original comment by android....@gmail.com on 30 Aug 2010 at 7:03

GoogleCodeExporter commented 9 years ago
If you need anything else just let me know, I will close this issue for now...

Original comment by heldersepu on 30 Aug 2010 at 1:01

GoogleCodeExporter commented 9 years ago
Hi,

I just have another question maybe you could help me.
I got a tile under "\3\13\407\6\549.png" by catcher, and I want to check if the 
tile is correct. According to the formular you stated.
coord = 13*1024+407, 6*1024+549, 3. (13719, 6693, 3)
And I requested the tile by a URL 
http://tile.openstreetmap.org/3/13719/6693.png, but it returns "not found". 

Anything wrong?

Original comment by android....@gmail.com on 7 Sep 2010 at 2:25

GoogleCodeExporter commented 9 years ago
take a look to openStreetMaps.py:
http://code.google.com/p/gmapcatcher/source/browse/trunk/src/mapServers/openStre
etMaps.py

The key is the zoom we also have "our own" zoom
the Correct URL will be:
http://tile.openstreetmap.org/15/13719/6693.png

Original comment by heldersepu on 7 Sep 2010 at 3:57

GoogleCodeExporter commented 9 years ago
What exactly are you trying to do? Maybe I can help...

Original comment by heldersepu on 7 Sep 2010 at 4:00

GoogleCodeExporter commented 9 years ago
http://tile.openstreetmap.org/3/13719/6693.png is still not the correct tile, 
attached is the one I downloaded by catcher.

Here is the story. I have an iPhone app developed already using TouchMe. And I 
changed the part of code to let TouchMe support offline tiles which are stored 
in a db file according to the following link 
http://www.gisnotes.com/wordpress/2010/08/iphone-dev-note-21-route-me-offline-ma
pping-from-database/
It downloads the tiles in three level directory (zoom/row/column.png), and 
everything works fine in my project. But the way it downloads the tiles is 
quite complicated for normal user. I just want to provide them a graphical and 
easy use tool to download the tiles.
Because of the difference of directory structure, I have no idea how to import 
the tiles which downloaded by  catcher into my db file.

Original comment by android....@gmail.com on 8 Sep 2010 at 3:33

Attachments:

GoogleCodeExporter commented 9 years ago
I have no idea why is not the same for you, it is the same for me, it has to be 
otherwise GMapCatcher will not work correctly 

FileName  = \.googlemaps\tiles\-1\97\285\144\753.png
GMapCoord = 99613, 148209, -1
OSM URL   = http://tile.openstreetmap.org/18/99613/148209.png

Original comment by heldersepu on 8 Sep 2010 at 1:02

Attachments:

GoogleCodeExporter commented 9 years ago
 I was looking to the link you sent, now I have a better understanding of what you want to do. GMapCatcher has multiple storage options (see attached image), we also have an option to save the tiles into a db file (SQLite), that might not be the same format that TouchMe uses, but I'm sure is similar, what I will recommend you is to save the downloaded tiles directly to the DB file

Original comment by heldersepu on 8 Sep 2010 at 1:32

Attachments:

GoogleCodeExporter commented 9 years ago
I've checked the structure of db, and there is light difference in zoom level. 
What's the relation between "your own" zoom and OSM zoom, is there a way to 
convert them?

"FileName  = \.googlemaps\tiles\-1\97\285\144\753.png
GMapCoord = 99613, 148209, -1
OSM URL   = http://tile.openstreetmap.org/18/99613/148209.png"
How do you get zoom level -1 to 18?

Original comment by android....@gmail.com on 9 Sep 2010 at 9:58

GoogleCodeExporter commented 9 years ago
it's all done in the openStreetMaps.py
MAP_MAX_ZOOM_LEVEL - coord[2]
17 - (-1)
18

I see that the link I sent you to openStreetMaps.py does not work, here try 
this:
http://code.google.com/p/gmapcatcher/source/browse/trunk/gmapcatcher/mapServers/
openStreetMaps.py?r=1043

Original comment by heldersepu on 9 Sep 2010 at 12:38