Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBTiles creation doesn't work #13

Closed
ajashton opened this issue Mar 11, 2011 · 8 comments
Closed

MBTiles creation doesn't work #13

ajashton opened this issue Mar 11, 2011 · 8 comments

Comments

@ajashton
Copy link
Member

At first I thought it was just because x & y were reversed, but my theoretical solution still isn't giving mbtiles that can be viewed in tilestream (though they seem ok from sqlite3?)

@maply-dev
Copy link

I also can't get the created mbtiles file to work in maps-on-a-stick, mapbox-routeme or elsewhere.
The filesize is fine, and when you perform the reverse process (from mbtiles to pngs), pngs get extracted, but:

I noticed that when extracting from mbtiles to pngs, X folders also get a .png extension (!)
The problem in visualisation must be connected to this.
I am trying to analyse the python code to see if I can find where this suffix append happens, but it might be as well an issue in the sql query.
This behaviour is the same both under windows 7 and ubuntu 10.10, python 2.6.6

If anyone spots what is wrong, please post the solution...

@ajashton
Copy link
Member Author

Fixing db insertion x/y order; removing file extension from inserted y value. Closed by 743941b.

@maply-dev
Copy link

many thanks.

For those who generate tiles with Maperitive or other systems based on Google tiles coordinates, keep in mind that before creating the .mbtiles, you should change the y in filenames from the Google to the Tile Map Service coordinate system: y_tms = (2**zoom - 1) - y_google

see http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/

@F3L1X79
Copy link

F3L1X79 commented Jul 4, 2017

@maply-dev I'd like to do so, but where do you make such changes?

@marco-piccolino
Copy link

@F3L1X79 you need to write a script which loops over the tiles folders

@F3L1X79
Copy link

F3L1X79 commented Jul 4, 2017

Well, thank you for answering me! I don't know if I was clear on what I want.

I have created a .mbtiles file with TileMill, and I need tiles folders (xyz) to read it with OpenLayers3.

I'm actually using mbUtils to generate those folders, but the subfolders y and the files z.png seem to be not geolocated. Is it possible to use a projection (like EPSG:3857) when creating the folders and tiles at the good location like it is done when using gdal2tiles on a raster file?
Or is this feature not supported by mbUtils?

@marco-piccolino
Copy link

marco-piccolino commented Jul 4, 2017 via email

@F3L1X79
Copy link

F3L1X79 commented Jul 4, 2017

Ok sorry, it is working well with the good projection! It was just my local web-server which was not strong enough to load an entire map of the world and was crashing silently...
Anyway thank you for answering me!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants