[GRASS-dev] [GRASS GIS] #1784: wingrass6.4.3svn: raster3d problems

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
tested with osgeo4w-wingrass6.4.3RC1 and the slovakia3d-precipitation-
sample dataset, there are crashes with g.region and r3.info related to 3d-
rasters:

{{{
g.region -p rast3d=precip3d.500z50@PERMANENT
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj: 0
D3/3: region item: zone: 0
D3/3: region item: north: 5530000
D3/3: region item: south: 5275000
D3/3: region item: east: 4631000
D3/3: region item: west: 4186000
D3/3: region item: cols: 890
D3/3: region item: rows: 510
D3/3: region item: e-w resol: 500
D3/3: region item: n-s resol: 500
D3/3: region item: top: 3000
D3/3: region item: bottom: 0
D3/3: region item: cols3: 890
D3/3: region item: rows3: 510
D3/3: region item: depths: 6
D3/3: region item: e-w resol3: 500
D3/3: region item: n-s resol3: 500
D3/3: region item: t-b resol: 500
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj: 0
D3/3: region item: zone: 0
D3/3: region item: north: 5492305
D3/3: region item: south: 5294826
D3/3: region item: east: 4603765
D3/3: region item: west: 4193437
D3/3: region item: cols: 821
D3/3: region item: rows: 395
D3/3: region item: e-w resol: 499.79049939
D3/3: region item: n-s resol: 499.94683544
D3/3: region item: top: 1900.000000000000000
D3/3: region item: bottom: 95.000000000000000
D3/3: region item: cols3: 821
D3/3: region item: rows3: 395
D3/3: region item: depths: 1805
D3/3: region item: e-w resol3: 499.79049939
D3/3: region item: n-s resol3: 499.94683544
D3/3: region item: t-b resol: 1
WARNING: G3d_readWindow: unable to find
[\grassdata/slovakia3d/user1/windows3d/\grassdata/slovakia3d/PERMANENT/grid3/precip3d.500z50/cellhd].
ERROR: Invalid region: North must be larger than South
}}}

=> r3.info crash

{{{
r3.info --verbose map=precip3d.500z50@PERMANENT
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj: 0
D3/3: region item: zone: 0
D3/3: region item: north: 5492305
D3/3: region item: south: 5294826
D3/3: region item: east: 4603765
D3/3: region item: west: 4193437
D3/3: region item: cols: 821
D3/3: region item: rows: 395
D3/3: region item: e-w resol: 499.79049939
D3/3: region item: n-s resol: 499.94683544
D3/3: region item: top: 1900.000000000000000
D3/3: region item: bottom: 95.000000000000000
D3/3: region item: cols3: 821
D3/3: region item: rows3: 395
D3/3: region item: depths: 1805
D3/3: region item: e-w resol3: 499.79049939
D3/3: region item: n-s resol3: 499.94683544
D3/3: region item: t-b resol: 1
}}}

=> r3.info crash

Helmut

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

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [ticket:1784 hellik]:

> WARNING: G3d_readWindow: unable to find
[\grassdata/slovakia3d/user1/windows3d/\grassdata/slovakia3d/PERMANENT/grid3/precip3d.500z50/cellhd].
> ERROR: Invalid region: North must be larger than South
> }}}
>
> => r3.info crash

correction: g.region crash

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

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

{{{
WARNING: G3d_readWindow: unable to find
[\grassdata/slovakia3d/user1/windows3d/\grassdata/slovakia3d/PERMANENT/grid3/precip3d.500z50/cellhd].
ERROR: Invalid region: North must be larger than South
}}}

maybe a path issue?

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

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:2 hellik]:
> {{{
> WARNING: G3d_readWindow: unable to find
[\grassdata/slovakia3d/user1/windows3d/\grassdata/slovakia3d/PERMANENT/grid3/precip3d.500z50/cellhd].
> ERROR: Invalid region: North must be larger than South
> }}}
>
> maybe a path issue?

tested with the 3d raster mentioned here:
http://lists.osgeo.org/pipermail/grass-dev/2013-February/061990.html

{{{
g.region -p rast3d=JR_7408MR_2m_t70@testvolume
WARNING: G3d_readWindow: unable to find
[C:\grassdata/nc_spm_08/testvolume/windows3d/C:\grassdata/nc_spm_08/testvolume/grid3/JR_7408MR_2m_t70/cellhd].
ERROR: Invalid region: North must be larger than South
}}}

and a crash with

{{{
r3.info map=JR_7408MR_2m_t70@testvolume
}}}

3d-rasters/volumes in wingrass6.4.3svn/RC aren't usable at the moment.

Helmut

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

On 2/14/13, GRASS GIS <trac@osgeo.org> wrote:

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new

...

[\grassdata/slovakia3d/user1/windows3d/\grassdata/slovakia3d/PERMANENT/grid3/precip3d.500z50/cellhd].

... double path...

tested with the 3d raster mentioned here:
http://lists.osgeo.org/pipermail/grass-dev/2013-February/061990.html

{{{
g.region -p rast3d=JR_7408MR_2m_t70@testvolume
WARNING: G3d_readWindow: unable to find
[C:\grassdata/nc_spm_08/testvolume/windows3d/C:\grassdata/nc_spm_08/testvolume/grid3/JR_7408MR_2m_t70/cellhd].

Huh, twice C:\...

Does this command work in G7 on the same data?

Markus

Does this command work in G7 on the same data?

g.region -p rast3d=JR_7408MR_2m_t70@testvolume
WARNING: Rast3d_read_window: unable to find
[C:\grassdata/nc_spm_08/testvolume/windows3d/C:\grassdata/nc_spm_08/testvolume/grid3/JR_7408MR_2m_t70/cellhd].
ERROR: Nordwert muss größer als der Südwert sein

not really...

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GRASS-GIS-1784-wingrass6-4-3svn-raster3d-problems-tp5013946p5034288.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Thu, Feb 14, 2013 at 2:55 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Does this command work in G7 on the same data?

g.region -p rast3d=JR_7408MR_2m_t70@testvolume
WARNING: Rast3d_read_window: unable to find
[C:\grassdata/nc_spm_08/testvolume/windows3d/C:\grassdata/nc_spm_08/testvolume/grid3/JR_7408MR_2m_t70/cellhd].
ERROR: Nordwert muss größer als der Südwert sein

not really...

I tried to debug this on Linux but I have no idea what to look for.
The problem might be in

lib/raster3d/windowio.c
Rast3d_getFullWindowPath()

Maybe this line causing troubles (guessing around)?
    if ((*windowName == '/') || (*windowName == '.')) {

Glynn (sorry to ask you directly), any pointers for me?

thanks
Markus

Markus Neteler wrote:

On Thu, Feb 14, 2013 at 2:55 PM, Helmut Kudrnovsky <hellik@web.de> wrote:
>>Does this command work in G7 on the same data?
>
>
> g.region -p rast3d=JR_7408MR_2m_t70@testvolume
> WARNING: Rast3d_read_window: unable to find
> [C:\grassdata/nc_spm_08/testvolume/windows3d/C:\grassdata/nc_spm_08/testvolume/grid3/JR_7408MR_2m_t70/cellhd].
> ERROR: Nordwert muss größer als der Südwert sein
>
> not really...

I tried to debug this on Linux but I have no idea what to look for.
The problem might be in

lib/raster3d/windowio.c
Rast3d_getFullWindowPath()

Maybe this line causing troubles (guessing around)?
    if ((*windowName == '/') || (*windowName == '.')) {

I think so.

Glynn (sorry to ask you directly), any pointers for me?

The minimal portability fix for the above is:

  if (G_is_absolute_path(windowName) || (*windowName == '.'))

But I suggest either:

  if (strpbrk(windowName, "/\\")) {
or:
  if (strchr(windowName, GRASS_DIRSEP) || strchr(windowName, HOST_DIRSEP)) {

which will check whether the window "name" contains any slash or
backslash characters (in which case, it's almost certainly meant to be
a path rather than a name). Unlike the existing code, this will allow
relative paths which don't start with "./" (which should be
redundant). The second alternative avoids matching a backslash on Unix
(which probably doesn't matter; backslashes in filenames are legal but
rare).

Alternatively, assuming that window names are bound by the same rules
as raster map names:

  if (!G_legal_filename(windowName)) {

--
Glynn Clements <glynn@gclements.plus.com>

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by neteler):

Please try r55120 in GRASS 7 (may be backported to G6:
lib/g3d/g3dwindowio.c if working)

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

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:4 neteler]:
> Please try r55120 in GRASS 7 (may be backported to G6:
lib/g3d/g3dwindowio.c if working)

tested with

{{{
System Info
GRASS version: 7.0.svn
GRASS SVN Revision: 55121
Build Date: 2013-02-20
GIS Library Revision: 52468 (2012-07-27)
GDAL/OGR: 1.9.2
PROJ.4: 4.8.0
GEOS: 3.3.6dev
SQLite: 3.7.10
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

{{{
r3.info map=precip3d.500z50@PERMANENT
WARNING: You are using an old raster3d data format, the vertical unit is
undefined. Please use r3.support to define the vertical unit to avoid this
warning.
+----------------------------------------------------------------------------+
  | Layer: precip3d.500z50@PERMANENT Date: ??
|
  | Mapset: PERMANENT Login of Creator: ??
|
  | Location: slovakia3d
|
  | DataBase: C:\grassdata
|
  | Title: ??
|
  | Units: none
|
  | Vertical unit: (null)
|
  | Timestamp: none
|
|----------------------------------------------------------------------------|
  |
|
  | Type of Map: 3d cell Number of Categories: 0
|
  | Data Type: DCELL
|
  | Rows: 510
|
  | Columns: 890
|
  | Depths: 6
|
  | Total Cells: 2723400
|
  | Total size: 6728954 Bytes
|
  | Number of tiles: 7168
|
  | Mean tile size: 938 Bytes
|
  | Tile size in memory: 4096 Bytes
|
  | Number of tiles in x, y and z: 112, 64, 1
|
  | Dimension of a tile in x, y, z: 8, 8, 8
|
  |
|
  | Projection: x,y (zone 0)
|
  | N: 5530000 S: 5275000 Res: 500
|
  | E: 4631000 W: 4186000 Res: 500
|
  | T: 3000 B: 0 Res: 500
|
  | Range of data: min = 525.45690918 max = 1801.44433594
|
  |
|
+----------------------------------------------------------------------------+
(Wed Feb 20 17:14:56 2013) Command finished (0 sec)
}}}

{{{
g.region -p rast3d=precip3d.500z50@PERMANENT
projection: 0 (x,y)
zone: 0
north: 5530000
south: 5275000
west: 4186000
east: 4631000
nsres: 500
ewres: 500
rows: 510
cols: 890
cells: 453900
(Wed Feb 20 17:16:45 2013) Command finished (0 sec)
}}}

seems to work with this revision in G7.

backport?

thanks
Helmut

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

#1784: wingrass6.4.3svn: raster3d problems
----------------------+-----------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by neteler):

Excellent. Backported to 6.4 and 6.5 in r55135 and r55136: please test
also there.

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

#1784: wingrass6.4.3svn: raster3d problems
--------------------------+-------------------------------------------------
  Reporter: hellik | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.3
Component: Raster3D | Version: 6.4.3 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows 7 | Cpu: x86-64
--------------------------+-------------------------------------------------
Changes (by hellik):

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

Comment:

Replying to [comment:6 neteler]:
> Excellent. Backported to 6.4 and 6.5 in r55135 and r55136: please test
also there.

tested with

{{{
System Info
GRASS version: 6.4.3svn
GRASS SVN Revision: 55137
GIS Library Revision: 50937 (2012-02-25)
GDAL/OGR: 1.9.2
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

{{{
g.region -p -3 rast3d=precip3d.500z50@PERMANENT
projection: 0 (x,y)
zone: 0
north: 5530000
south: 5275000
west: 4186000
east: 4631000
top: 3000.00000000
bottom: 0.00000000
nsres: 500
nsres3: 500
ewres: 500
ewres3: 500
tbres: 500
rows: 510
rows3: 510
cols: 890
cols3: 890
depths: 6
cells: 453900
cells3: 2723400
(Thu Feb 21 10:13:03 2013) Command finished (0 sec)
}}}

{{{
r3.info map=precip3d.500z50@PERMANENT
+----------------------------------------------------------------------------+
  | Layer: precip3d.500z50@PERMANENT Date: ??
|
  | Mapset: PERMANENT Login of Creator: ??
|
  | Location: slovakia3d
|
  | DataBase: C:\grassdata
|
  | Title: ( ?? )
|
  | Timestamp: none
|
|----------------------------------------------------------------------------|
  |
|
  | Type of Map: 3d cell Number of Categories: 0
|
  | Data Type: double
|
  | Rows: 510
|
  | Columns: 890
|
  | Depths: 6
|
  | Total Cells: 2723400
|
  | Projection: x,y (zone 0)
|
  | N: 5530000 S: 5275000 Res: 500
|
  | E: 4631000 W: 4186000 Res: 500
|
  | T: 3000 B: 0 Res: 500
|
  | Range of data: min = 525.45690918 max = 1801.44433594
|
  |
|
+----------------------------------------------------------------------------+
}}}

seems to work, closing ticket.

Helmut

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