[GRASS-dev] [GRASS GIS] #3917: r.info|v.info|r3.info|t.info: display map size used on disk

GRASS GIS trac at osgeo.org
Sun Oct 13 05:12:11 PDT 2019


#3917: r.info|v.info|r3.info|t.info: display map size used on disk
--------------------------+---------------------------------------------
  Reporter:  neteler      |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.8.1
 Component:  Default      |    Version:  svn-trunk
Resolution:               |   Keywords:  r.info, v.info, r3.info, t.info
       CPU:  All          |   Platform:  All
--------------------------+---------------------------------------------

Comment (by neteler):

 Here some code which could probably support the implementation:

 * https://github.com/OSGeo/grass-
 addons/blob/master/grass7/general/g.compare.md5/g.compare.md5.py

 For SQLite table sizes (apparently not easy to obtain):

 * https://stackoverflow.com/questions/27572387/query-that-returns-the-
 size-of-a-table-in-a-sqlite-database#36627097

 Hence (https://www.sqlite.org/dbstat.html):
 {{{
 sqlite3 nc_spm_08_grass7/PERMANENT/sqlite/sqlite.db

 # page size
 sqlite> SELECT SUM("pgsize") FROM "dbstat" WHERE name='zipcodes_wake';
 5120
 sqlite> SELECT SUM("pgsize") FROM "dbstat" WHERE name='roadsmajor';
 12288
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3917#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list