Projection questions

tjmgis's Avatar

tjmgis

13 Feb, 2012 08:38 PM

Hi All

Firstly, can someone explain why TileMill and the MbTiles spec only supports EPSG:900913?

I am having so many problems gdalwarp the data and it makes it look horrific, so I would much prefer to keep it in the original projection.

As there is some Proj4 within TileMill and all the MBTiles is an SQLite database with a metadata table I am not sure why there is a restriction?

Also TileMill currently uses EPSG:900913, however having done some research there seems to be some negativity towards that EPSG code. So EPSG:3785 was created and then shortly later the EPSG:3857 was created. There is a good blog post here

http://alastaira.wordpress.com/2011/01/23/the-google-maps-bing-maps...

So wondering which one is best and supported by TileMill

thanks for any help/answers

Tim

  1. Support Staff 2 Posted by Tom MacWright on 13 Feb, 2012 08:49 PM

    Tom MacWright's Avatar

    Hey Tim,

    Sure, a few quick reasons:

    • There's no viable tiling standard that supports multiple projections
    • The proj4/epsg standard for referring to projections isn't very good and there's no viable replacement
    • Only one (OpenLayers) of our supported clients supports any projection besides EPSG:900913
    • Since there's no standard for tiling projections, there's no standard set of zoom resolutions, and thus nothing for our styling language to hook onto for making cross-projection styles
    • There's no standard for identifying map projections to different clients and cleanly failing then those projections aren't supported.

    So, in short, for many deep reasons.

    You might want to try different resampling schemes in gdalwarp, or hunting down higher-res source data.

    TileMill calls its projection EPSG:900913. The numbers are interchangeable, and some of them are caused by (gasp) mispellings, rather than any consensus. If they're done correctly, they're identical and there's no best amongst them, so we call it the most popular code.

    Tom

  2. 3 Posted by tjmgis on 13 Feb, 2012 09:08 PM

    tjmgis's Avatar

    Hi Tom

    Thanks for the answers.

    I have been creating huge tile caches (>30million tiles) using geowebcache and moving them around! Yes its as bad as it sounds! We overwrite the normal projection and resolutions by using a geowebcache.xml (essentially a configuration file if you are not familiar). Gives us control of the projection, the tile size and the resolution.

    But it would be great to move to a mbtile type environment, so we dont have problems moving tile caches around.

    Ok will specify EPSG:900913 when I gdalwarp. I have just stumbled across that i can gdalwarp to a VRT and then do a gdal_translate on the VRT to GeoTIFF with COMPRESS=LZW, which is super quicker.

    Now if i could just add a Geotiff that is bigger than 100mb ;)

    Last one, i see gdal 2.0 will support MBTiles, anyone know when this might be avaliable more than happy to help test

    cheers

    tim

  3. Support Staff 4 Posted by Tom MacWright on 15 Feb, 2012 11:52 PM

    Tom MacWright's Avatar

    Hey Tim,

    Heh, 30 million tiles - that's quite a few. Luckily if you're going the MBTiles route, we've been doing some similarly-sized tilesets and not running into any size limitations. Other than disk space, of course.

    Yep - not sure when builds of GDAL 2.0 will start coming out, but it'll be awesome, and hopefully let us deprecate tools like raster2mb for a much, much more powerful solution.

    Tom

  4. Tom MacWright closed this discussion on 15 Feb, 2012 11:52 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

23 May, 2013 04:51 PM
23 May, 2013 02:31 PM
23 May, 2013 02:03 PM
11 Apr, 2013 01:37 PM
23 May, 2013 01:25 PM

 

23 May, 2013 04:55 AM