Bug report #17611

r.in.lidar and other r.* tools Error: 'Raster map not found' (worked until QGIS 2.18.14, GRASS 7.2.0)

Added by Alen Mangafic over 2 years ago. Updated about 1 year ago.

Status:Open
Priority:High
Assignee:-
Category:Processing/GRASS
Affected QGIS version:3.6.0 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25508

Description

The r.in.lidar in QGIS 2.18.14 and in GRASS 7.0.3 in Linux Mint and Windows 10 do the same error when running the tool:

Algorithm r.in.lidar - Creates a raster map from LAS LiDAR points using univariate statistics. starting...
g.proj -c proj4="+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
g.region n=92000.0 s=91000.0 e=396000.0 w=395000.0 res=1
r.in.lidar input="/home/alen/Desktop/TM_395_91.laz" method=mean type=FCELL zscale="1" percent="100" resolution="1" -e -o output=output412a4072b5e749b8b5eaa46a1e1a183f --overwrite
g.region raster=output412a4072b5e749b8b5eaa46a1e1a183f
r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW" input=output412a4072b5e749b8b5eaa46a1e1a183f output="/home/alen/Desktop/obmocje.tif"
Cleaning up temporary files...
Starting GRASS GIS...
Executing '/home/alen/.qgis2//processing/grass7_batch_job.sh' ...
Default region was updated to the new projection, but if you have multiple mapsets `g.region -d` should be run in each to update the region from the default
Projection information updated
ERROR: Unable to open file
ERROR: Raster map not found
ERROR: Raster map or group not found
Execution of '/home/alen/.qgis2//processing/grass7_batch_job.sh' finished.
Cleaning up temporary files...
Cleaning up temporary files...
Starting GRASS GIS...
Executing '/home/alen/.qgis2//processing/grass7_batch_job.sh' ...
ERROR: Raster map not found
ERROR: Raster map or group not found
Execution of '/home/alen/.qgis2//processing/grass7_batch_job.sh' finished.
Cleaning up temporary files..

For Windows 10 I tried for both the OSGeo4W install and the direct install. I tried it also with QGIS 2.16.x and 2.14.x for both the OS. In Linux Mint I apt-get autoremoved/autocleaned always after.
In Windows 10, if I install GRASS 7.2.2 separately and run the tool from it, it works well. I tried to reconnect QGIS with the separate GRASS install, but it does the same error again.

It worked until a few updates ago; it works well in QGIS 2.18.5 with GRASS 7.2.0
I noticed that also other r.* GRASS tools don't work anymore.

History

#1 Updated by Alen Mangafic over 2 years ago

  • Assignee deleted (Alen Mangafic)

#2 Updated by Giovanni Manghi over 2 years ago

  • Category changed from GRASS to Processing/GRASS
  • Assignee set to Giovanni Manghi

#3 Updated by Matthias Treitler about 1 year ago

Same error with QGIS 3.4 under Linux

#4 Updated by Giovanni Manghi about 1 year ago

  • Affected QGIS version changed from 2.18.14 to 3.4.3
  • Subject changed from r.in.lidar and other r.* tools Error: 'Raster map not found' in QGIS 2.18.14 GRASS 7.2.2 (worked until QGIS 2.18.14, GRASS 7.2.0) to r.in.lidar and other r.* tools Error: 'Raster map not found' (worked until QGIS 2.18.14, GRASS 7.2.0)
  • Assignee deleted (Giovanni Manghi)

#5 Updated by Luigi Pirelli about 1 year ago

  • Assignee set to Luigi Pirelli

investigating

#6 Updated by Luigi Pirelli about 1 year ago

  • Status changed from Open to Feedback

Hi
I'm not en expert using r.in.lidar, I had some problems putting it at work in grass directly, btw I was able to run it in grass74 and in qgis master via processing on linux.
Somethig failed during:
r.in.lidar input="/home/alen/Desktop/TM_395_91.laz" method=mean type=FCELL zscale="1" percent="100" resolution="1" -e -o output=output412a4072b5e749b8b5eaa46a1e1a183f --overwrite

I see that not setting filter Z and intensity range that are marked optionals, generate null data rasters.

Alen Mangafic can you check playing with r.in.lidar parameters in processing with latest qgis? In my case seems it's work with some parameter conditions.

#7 Updated by Luigi Pirelli about 1 year ago

tested also on win10 and qgis-dev... seems its works correctly setting Z and intensity range. IMHO it can be closed

#8 Updated by Alen Mangafic about 1 year ago

Luigi Pirelli wrote:

tested also on win10 and qgis-dev... seems its works correctly setting Z and intensity range. IMHO it can be closed

Hi, the default Z should be 1.0 (any scaling is highly optional) and the majority that users want is the import of Z values and not of the intensities. That could be the error sources. I will retry this days in Windows 10 and the last Ubuntu and let you know (I would do it right now if I wasn't chained in bed by flu).

Thank you very much for digging into it.

Regards,
Alen

#9 Updated by Luigi Pirelli about 1 year ago

Z range is not related with Z scale (e.g. exageration). ZRange is used to cut a data cube within a specific Z range.

#10 Updated by Alen Mangafic about 1 year ago

Luigi Pirelli wrote:

Z range is not related with Z scale (e.g. exageration). ZRange is used to cut a data cube within a specific Z range.

Sorry, I undersood just now you takked about ranges.The minima and maxima of the dataset should be the default? I will check when on computer :)

#11 Updated by Luigi Pirelli about 1 year ago

no problem... thanks for checking. About setting by default min/max IMHO is the expected behaviour but no idea if before was able to setup the range automatically. IMHO if min=max => no range have to be set => gets all. But the issue is not related with if parameters are correct or not, but related if r.in.lidar works (in some way) or not.

#12 Updated by Giovanni Manghi about 1 year ago

  • Affected QGIS version changed from 3.4.3 to 3.6.0
  • Status changed from Feedback to Open
  • Assignee deleted (Luigi Pirelli)
  • Operating System deleted (Windows 10 and Linux Mint 18.3)

The module in native GRASS works:

a command like

r.in.lidar -e --overwrite input=/home/giovanni/Downloads/NEONDSSampleLiDARPointCloud.las output=test1 resolution=10

produces the expected output in native GRASS.

The problem in QGIS/Processing seems to be (possibly among the others) the parameters that SHOULD be optional (like the ranges) but are not, because are filled by default with values that is not possible to set to "none", and where we can't set by default anything other than "0".

In QGIS the base minimum commnad we produce is

r.in.lidar input="/home/giovanni/Downloads/NEONDSSampleLiDARPointCloud.las" method="mean" type="FCELL" zrange="0,0" zscale=1 intensity_range="0,0" intensity_scale=1 percent=100

that evidently is not 100% correct, at least for a general scenario.

If we tweak the parameters to

r.in.lidar input="/home/giovanni/Downloads/NEONDSSampleLiDARPointCloud.las" method="mean" type="FCELL" zrange="-1000000,1000000" zscale=1 intensity_range="-1000000,1000000" intensity_scale=1 percent=100 resolution=10 -e

this STILL does not work in QGIS/Processing, but DOES work in the GRASS console, that indicated that there is even more than only problems with parameters defaults.

Also available in: Atom PDF