[GRASS-SVN] r60367 - grass-addons/grass6/raster/r.out.mbtiles
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 19 23:52:27 PDT 2014
Author: hamish
Date: 2014-05-19 23:52:27 -0700 (Mon, 19 May 2014)
New Revision: 60367
Modified:
grass-addons/grass6/raster/r.out.mbtiles/description.html
grass-addons/grass6/raster/r.out.mbtiles/r.out.mbtiles
Log:
add a db index to speed things up, note alternate MBUtil encoder
Modified: grass-addons/grass6/raster/r.out.mbtiles/description.html
===================================================================
--- grass-addons/grass6/raster/r.out.mbtiles/description.html 2014-05-20 05:29:40 UTC (rev 60366)
+++ grass-addons/grass6/raster/r.out.mbtiles/description.html 2014-05-20 06:52:27 UTC (rev 60367)
@@ -1,13 +1,14 @@
<h2>DESCRIPTION</h2>
<em>r.out.mbtiles</em> creates a TMS tileset and support files ready to
-load into software like Geopaparazzi which will make the final conversion to
-a MBTiles SQLite database file.
+load into software like Geopaparazzi or Tilemill. It will optionally
+generate a MBTiles SQLite database from the tile tree.
<h2>NOTES</h2>
-Either an individual raster map or a raster map imagery group may be given as input.
+Either an individual raster map or a raster map imagery group may be given
+as input.
<p>
If not specified the zoom level will be automatically chosen.
<p>
@@ -20,6 +21,10 @@
as the tile source in <em>Geopaparazzi</em>. The MBTiles SQLite
database will then be populated in the background.
<p>
+If the <a href="https://github.com/mapbox/mbutil">MBUtil</a> program
+is installed you can use it as an alternate method to convert the tile
+tree into a highly optimized MBTiles database.
+<p>
Too many tiles? Use the <b>zoom</b> parameter to limit the current
operation to a single zoom level, then crop the region with
<em>g.region</em> to where you need detailed coverage and re-run
@@ -31,8 +36,8 @@
<h2>EXAMPLE</h2>
Example 1:
-Creates a tileset for the North Carolina sample dataset's <tt>soilsID</tt> raster
-map at automatically chosen zoom levels 11-14.
+Creates a tileset for the North Carolina sample dataset's <tt>soilsID</tt>
+raster map at automatically chosen zoom levels 11-14.
<div class="code"><pre>
g.region rast=soilsID
Modified: grass-addons/grass6/raster/r.out.mbtiles/r.out.mbtiles
===================================================================
--- grass-addons/grass6/raster/r.out.mbtiles/r.out.mbtiles 2014-05-20 05:29:40 UTC (rev 60366)
+++ grass-addons/grass6/raster/r.out.mbtiles/r.out.mbtiles 2014-05-20 06:52:27 UTC (rev 60367)
@@ -515,7 +515,10 @@
done
) >> "$TMPFILE.sql"
- echo "COMMIT TRANSACTION;" >> "$TMPFILE.sql"
+ cat << EOF >> "$TMPFILE.sql"
+COMMIT TRANSACTION;
+CREATE UNIQUE INDEX tiles_index ON tiles (zoom_level, tile_column, tile_row);
+EOF
if [ `wc -l < "$TMPFILE.sql"` -gt 65535 ] ; then
echo "FIXME: insert some 'COMMIT TRANSACTION; BEGIN TRANSACTION;' inline the sql every 65535 inserts or so"
More information about the grass-commit
mailing list