[gdal-dev] Creating multiple zooms in MBTiles generation
Even Rouault
even.rouault at spatialys.com
Fri May 13 05:51:23 PDT 2016
Le vendredi 13 mai 2016 14:24:38, Gane R a écrit :
> Hi,
>
> I was working with gdal 2.1.0, I was trying to convert a geopackage raster
> to mbtiles, I used GDALCreateCopy to convert the dataset to mbtiles.
>
> On http://www.gdal.org/frmt_mbtiles.html
>
> I saw an example to use gdal_translate and then to use gdaladdo to
> overviews
>
> Q1: I got only one level of zoom level in the mbtiles. Is there any
> creation option to say to generate mbtiles from a to b zooms ?
No. Creation options for MBTILES are documented there :
http://gdal.org/frmt_mbtiles.html
> or I have to
> do by build overviews ???
Yes
>
>
> Q2: I tried to convert the Geopackage ERDC_Whitehorse_GeoPackage.gpkg size
> 111 MB in Web Mercator EPSG:3857 from the url
>
> http://www.geopackage.org/#sampledata
>
> (GeoPackage contains a raster tile pyramid that was created with free
> imagery obtained from Geomatics Yukon and covers an approximately 30
> square-kilometer area centered on the City of Whitehorse. It uses the Web
> Mercator (EPSG:3857) coordinate reference system, 256x256 pixel tiles,
> contains zoom levels 11-18, and is 110.8MB in size)
>
>
>
> *The resulting mbtiles was to 621MB Is this due to default PNG zlevel
> settings or any thing can be done on this ?*
The original GPKG probably uses JPEG compression, so if you use -co
TILE_FORMAT=JPEG you should get to a similar size. But this will cause some
quality loss due to decompression/recompression done in GDAL.
You can in a few commands convert a GPKG to MBTiles, provides that it uses a
Google Mercator tiling scheme as the sample dataset you use seem to be.
Have a look at the procedure described at the end of
http://erouault.blogspot.fr/2014/12/gdal-geopackage-raster-support.html
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list