[GRASS-SVN] r60336 - grass-addons/grass6/raster/r.out.mbtiles_prep

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 19 02:17:11 PDT 2014


Author: hamish
Date: 2014-05-19 02:17:11 -0700 (Mon, 19 May 2014)
New Revision: 60336

Modified:
   grass-addons/grass6/raster/r.out.mbtiles_prep/r.out.mbtiles_prep
Log:
fix MBTiles spec version, row/column order, add tile convention hint; now it works!

Modified: grass-addons/grass6/raster/r.out.mbtiles_prep/r.out.mbtiles_prep
===================================================================
--- grass-addons/grass6/raster/r.out.mbtiles_prep/r.out.mbtiles_prep	2014-05-19 09:04:55 UTC (rev 60335)
+++ grass-addons/grass6/raster/r.out.mbtiles_prep/r.out.mbtiles_prep	2014-05-19 09:17:11 UTC (rev 60336)
@@ -489,13 +489,14 @@
 CREATE TABLE metadata (name text, value text);
 INSERT INTO metadata VALUES ('name', '`basename "$OUTFILE"`');
 INSERT INTO metadata VALUES ('type', 'baselayer');
-INSERT INTO metadata VALUES ('version', '1.0');
+INSERT INTO metadata VALUES ('version', '1.1');
 INSERT INTO metadata VALUES ('description', '$TITLE_CLEAN');
 INSERT INTO metadata VALUES ('format', '$ext');
 INSERT INTO metadata VALUES ('bounds', '$ll_w,$ll_s,$ll_e,$ll_n');
 INSERT INTO metadata VALUES ('center', '$ll_clon,$ll_clat');
 INSERT INTO metadata VALUES ('minzoom', '$minzoom');
 INSERT INTO metadata VALUES ('maxzoom', '$maxzoom');
+INSERT INTO metadata VALUES ('tile_row_type', 'tms');
 CREATE TABLE tiles (zoom_level integer, tile_column integer, tile_row integer, tile_data blob);
 BEGIN TRANSACTION;
 EOF
@@ -513,7 +514,7 @@
       column=`echo "$crop" | cut -f2 -d'/'`
       row=`echo "$crop" | cut -f3 -d'/'`
 
-      echo "INSERT INTO tiles VALUES ($zoomlevel, $row, $column, X'`hexdump -v -e '1/1 "%.2x"' $file`');"
+      echo "INSERT INTO tiles VALUES ($zoomlevel, $column, $row, X'`hexdump -v -e '1/1 "%.2x"' $file`');"
    done
    ) > "${TMPFILE}_tiles.sql"
 



More information about the grass-commit mailing list