Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#2671 closed defect (fixed)

r.surf.idw won't make interpolation

Reported by: kuszinger Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Raster Version: svn-trunk
Keywords: interpolation, r.surf.idw Cc:
CPU: x86-64 Platform: Linux

Description

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.

Change History (9)

comment:1 Changed 5 years ago 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.

comment:2 in reply to:  1 Changed 5 years ago by annakrat

Replying to 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.

comment:3 Changed 5 years ago by annakrat

Keywords: r.surf.idw added; e.surf.idw removed

comment:4 Changed 5 years ago 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

comment:5 Changed 5 years ago 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

comment:6 Changed 5 years ago 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.

comment:7 in reply to:  6 Changed 5 years ago 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 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

comment:8 Changed 5 years ago by neteler

Resolution: fixed
Status: newclosed

comment:9 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.