[gdal-dev] MBTiles Error

Miller, Doug dmiller at JFTI.com
Fri Apr 15 09:27:55 PDT 2016


Even,

I tried option #1 (ogrinfo your.mbtiles -sql "DELETE FROM metadata WHERE name = 'bounds'") and then it came up clean with "gdalinfo" and loaded into QGIS correctly.

The bad files are property that I cannot share, but I would if I could.

Thanks for the help,

Doug
________________________________________
From: Even Rouault <even.rouault at spatialys.com>
Sent: Friday, April 15, 2016 9:53 AM
To: gdal-dev at lists.osgeo.org
Cc: Miller, Doug
Subject: Re: [gdal-dev] MBTiles Error

Le vendredi 15 avril 2016 15:34:59, Miller, Doug a écrit :
> Hi,
>
>
>
> I've got several files of MBTiles format that are from the an external
> source.  I'm using the 2.0.2 version of GDAL.  When opened by the gdalinfo
> CLI tool or the MBTiles driver they all have the same errors:
>
>
>
> Error 1: Invalid value for 'bounds' metadata
>
> Error 1: Cannot find min and max tile numbers
>
> gdalinfo failed- unable to open.......
>
>
>
> ????Other MBTiles files from the same publisher open just fine.
>
>
>
> Is there a way to fix or override this metadata?

There was a too restrictive check for the latitude range (didn't accept latitude above 86 deg).
One workaround might be to remove the bounds metadata item with :

ogrinfo your.mbtiles -sql "DELETE FROM metadata WHERE name = 'bounds'"

or alter the extent with

ogrinfo your.mbtiles -sql "UPDATE metadata SET value = 'min_long,min_lat,max_long,max_lat' WHERE name = 'bounds'"
(replace min_long,min_lat,max_long,max_lat by actual values)

>
>
>
> It looks like GDAL 2.2 will allow these parameters to be overridden, but I
> can't use a beta version in my product and the final release looks like it
> could be 4 months from now.

GDAL 2.1.0 you mean ? It should be out hopefully by end of the month, with the first release candidate to be issued next monday.
The MBTiles driver in it indeed improves the opening of some products that failed before.

I'd still be interested in having access to one of those products that currently fail to confirm that it works fine with 2.1.0.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list