[GRASS-dev] [GRASS GIS] #2671: r.surf.idw won't make interpolation

#2671: r.surf.idw won't make interpolation
---------------------------------------+-------------------------
Reporter: kuszinger | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Keywords: interpolation, e.surf.idw | CPU: x86-64
Platform: Linux |
---------------------------------------+-------------------------
However '''r.surf.idw''' won't make the interpolation for my dataset, I
tested on NC sample dataset where it was ok. ??

I was not able to reproduce it with any other dataset but mine. I've
created a cut of my data and accessible in the next comment.

Projection: UTM 48N / WGS84 (on the area of Cambodia)

+proj=utm
+no_defs
+zone=48
+a=6378137
+rf=298.257223563
+towgs84=0.000,0.000,0.000
+to_meter=1

Symptom:

r.surf.idw runs for the whole coverage. No error message displayed. When
finished, the target raster map is the very same as the input was.

Command run:
''r.surf.idw --overwrite input=debugfrom@lidar output=debugto npoints=7
''
Purpose: generate a continuous surface from a very sparse set of points on
the map.

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, e.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------

Comment (by kuszinger):

Test data is accessible here: [http://www.giscom.hu/debugfrom.pack\].
4.4 MB and I tested r.surf.idw against it with the command above. Output
was the same as input.

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, e.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------

Comment (by annakrat):

Replying to [comment:1 kuszinger]:
>
> Test data is accessible here: [http://www.giscom.hu/debugfrom.pack\].
> 4.4 MB and I tested r.surf.idw against it with the command above. Output
was the same as input.
>
>

Confirmed. Does it work in 6.4? What example did you use with NC dataset?
I was not able to make it work.

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, r.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------
Changes (by annakrat):

* keywords: interpolation, e.surf.idw => interpolation, r.surf.idw

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, r.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------

Comment (by kuszinger):

'''NC''': used '''elevation''', the whole, set g.region res=5 so the
target dataset is bigger, it ran well with good results. Anyway, the
source dataset is not sparse. I''' rerun on the NC elevation and making it
sparse with random nulls, ok?'''

'''6.4: yes, worked like charm''', less than 2GB memory usage (same
machine same everything).
One more extra: while the above debug region is:

{{{
projection: 1 (UTM)
zone: 48
datum: wgs84
ellipsoid: wgs84
north: 1529314.78008
south: 1528778.59005
west: 448590.883652
east: 449308.347889
nsres: 0.19999628
ewres: 0.20001791
rows: 2681
cols: 3587
cells: 9616747

}}}

the whole map which was successfully interpolated in 6.4 was:

{{{
projection: 1 (UTM)
zone: 48
datum: wgs84
ellipsoid: wgs84
north: 1525100
south: 1522400
west: 449885
east: 453027
nsres: 0.2
ewres: 0.2
rows: 13500
cols: 15710
cells: 212085000
}}}

so, my packed sample is only a cut of which was successfully processed in
6.4

Anyway, I try NC with its modified eleveation and coome back with the
results...

thanks

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, r.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------

Comment (by kuszinger):

Got it!

* Go to NC in Grass7.1
* {{{g.region raster=elevation@PERMANENT }}}
* {{{r.random -z --overwrite input=elevation@PERMANENT npoints=100000
raster=elev_sparse}}}
* {{{r.surf.idw --overwrite input=elev_sparse@user1 output=elev_sparse_idw
npoints=7}}}

Result is not interpolated.

Also tested in the same mapset with Grass6.4
* {{{r.surf.idw --overwrite input=elev_sparse@user1
output=elev_sparse_idw_64 npoints=7}}}

Result is ok in 6.4

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, r.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------

Comment (by annakrat):

I think I fixed it in r65214. Null values were not identified correctly. I
still don't understand why 64 version actually works.

By the way, r.surf.idw works only with integer rasters. But this is for a
different ticket.

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: interpolation, r.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------

Comment (by neteler):

The indicated test is now performed as follows:

{{{
# GRASS 7.1.svn (nc_spm_08_grass7)
g.region raster=elevation@PERMANENT -p
r.random -z --overwrite input=elevation@PERMANENT npoints=100000
raster=elev_sparse
r.surf.idw --overwrite input=elev_sparse output=elev_sparse_idw npoints=7
ERROR: This module currently only works for integer (CELL) maps
}}}

So, no result should be expected unless #2672 is solved.

Replying to [comment:6 annakrat]:
> I think I fixed it in r65214. Null values were not identified correctly.
I still don't understand why 64 version actually works.

Backported in r65261.

> By the way, r.surf.idw works only with integer rasters. But this is for
a different ticket.

Closing here, continuing in ticket #2672

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

#2671: r.surf.idw won't make interpolation
------------------------+---------------------------------------
  Reporter: kuszinger | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Resolution: fixed | Keywords: interpolation, r.surf.idw
       CPU: x86-64 | Platform: Linux
------------------------+---------------------------------------
Changes (by neteler):

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

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