[GRASS-dev] [GRASS GIS] #1825: r.tileset only returns one tile

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
When using r.tileset in GRASS 70, only one tile is returned, irrespective
of the number of rows and columns defined. It runs find in GRASS 64

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by martinl):

  * keywords: => r.tileset
  * component: Default => Raster

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by sbl):

Some variant of the same problem I guess:

On Ubuntu I get no tiles listed:

On my Windows box I get this error-message:

GRASS 7.0.svn> r.tileset sourceproj="+proj=utm +no_defs +zone=33
+a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000 +to_meter=1"
maxcols=25000 maxrows=25000 overlap=10
sh: r.tileset: command not found

On my Ubunut box no tiles are printed at all:

GRASS 7.0.svn (Norge_33N_WGS84):~ > r.tileset sourceproj="+proj=utm
+no_defs +zone=33 +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
+to_meter=1" maxcols=25000 maxrows=25000 overlap=10
Computing tiling...
GRASS 7.0.svn (Norge_33N_WGS84):~ >

Looks like a declaration of floating type variables I necessary, when the
tile_bbox w,s,e,n coordinates are calculated.
Furthermore, the bboxesIntersect() method does not work properly.

The provided patch should fix these issues.

But there will be still a rounding oddity, because my regions n,s,e,w have
no digits, while the tiles get some:

GRASS 7.0.svn (Norge_33N_WGS84):~ > g.region -up
projection: 1 (UTM)
zone: 33
datum: wgs84
ellipsoid: wgs84
north: 7972675
south: 6415595
west: -97865
east: 1165535
nsres: 10
ewres: 10
rows: 155708
cols: 126340
cells: 19672148720

GRASS 7.0.svn (Norge_33N_WGS84):~ > r.tileset1.py sourceproj="+proj=utm
+no_defs +zone=33 +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
+to_meter=1" maxcols=25000 maxrows=25000 overlap=10 --v
Projecting destination region into source...
Projecting source bounding box into destination...
Computing length of sides of source bounding box...
Computing tiling...
There will be 6 by 7 tiles each 21057 by 22244 cells
-97864.9638333|6415594.9703|112801.679274|6638134.85547|21067|22254
-97864.9638333|6638034.85552|112801.679274|6860674.74064|21067|22254
-97864.9638333|6860474.74074|112801.679274|7083214.62581|21067|22254
-97864.9638333|7082914.62596|112801.679274|7305754.51097|21067|22254
...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Can a Python dev please review sbl's patch?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Proposed patch submitted in r58782. Please test (and close ticket if issue
is now fixed).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by pvanbosgeo):

After update to the latest patch, running the function shows "computing
tiling...", but seems to get stuck at that point.

(also tested in 6.4, where it works without problems).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by sbl):

Tested in GRASS 7 revision 58670 (Ubuntu 12.04 32bit).

On my computer it works fine both with a full proj-string ("+proj=longlat
+datum=WGS84 +no_defs") and with the proj-string from the example from the
manual ("+init=epsg:4326").

However, the option "sourceproj" is case sensitive and improper projection
strings are not caught by a user-readable error message...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.tileset | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by sbl):

Sorry, 58670 was the Libgis Revision. SVN revision was: 59118

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1825: r.tileset only returns one tile
--------------------------+-------------------------------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Resolution: fixed | Keywords: r.tileset
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by lucadelu):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:6 sbl]:
> Tested in GRASS 7 revision 58670 (Ubuntu 12.04 32bit).
>

I tested with 62902 and it works.

> On my computer it works fine both with a full proj-string
("+proj=longlat +datum=WGS84 +no_defs") and with the proj-string from the
example from the manual ("+init=epsg:4326").
>
> However, the option "sourceproj" is case sensitive and improper
projection strings are not caught by a user-readable error message...

I add some more check in r62923 and r62924 to return more understandable
output.

I close this ticket, please reopen if needed

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1825#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>