Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRASS error when parameter is "pick coordinate" type #26624

Closed
qgib opened this issue Apr 17, 2018 · 5 comments
Closed

GRASS error when parameter is "pick coordinate" type #26624

qgib opened this issue Apr 17, 2018 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Easy fix GRASS Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Apr 17, 2018

Author Name: matteo ghetta (@ghtmtt)
Original Redmine Issue: 18737
Affected QGIS version: 3.0.0
Redmine category:processing/grass


in algorithms as r.drain, r.viewshed when choosing the coordinates from the map with the "pick coordinate" tool, the box is filled with X, Y + EPSG information that make GRASS fail to run the algorithm. This an example of the filled coordinates box:

348403.62350233766,4903994.026987238 [EPSG:32632]

@qgib
Copy link
Contributor Author

qgib commented Apr 18, 2018

Author Name: matteo ghetta (@ghtmtt)


It seems only Windows related, here the complete log of Processing:

Processing algorithm…
AlgorithmDialog
Input parameters:
{ 'input' : 'C:/Users/matteo/Desktop/QGIS_data/dtm.tif', 'direction' : , 'start_coordinates' : '1660752.0286831865,4779236.023414794 [EPSG:3003]', 'start_points' : , '-c' : False, '-a' : False, '-n' : False, '-d' : False, 'output' : 'C:/Users/matteo/AppData/Local/Temp/processing_083b6d735623475e9a59be854d8a7c0c/45a8e1dc7eb442728780ae595a52108f/output.tif', 'drain' : 'C:/Users/matteo/AppData/Local/Temp/processing_083b6d735623475e9a59be854d8a7c0c/8b0e8989371c44c0bac99d8f7f07381e/drain.shp', 'GRASS_REGION_PARAMETER' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_SNAP_TOLERANCE_PARAMETER' : -1, 'GRASS_MIN_AREA_PARAMETER' : 0.0001, 'GRASS_OUTPUT_TYPE_PARAMETER' : 0 }

g.proj -c proj4="+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs"
r.external input="C:\Users\matteo\Desktop\QGIS_data\dtm.tif" band=1 output="rast_5ad6e306154582" --overwrite -o
g.region n=4924820.77 s=4678320.77 e=1771747.2310344942 w=1554747.2310344942 res=100.0
r.drain input=rast_5ad6e306154582 start_coordinates=1660752.0286831865,4779236.023414794 [EPSG:3003] output=outputa50f84c91c1445a39d374cb68e55e4e3 drain=draina50f84c91c1445a39d374cb68e55e4e3 --overwrite
g.region raster=outputa50f84c91c1445a39d374cb68e55e4e3
r.out.gdal -t -m input="outputa50f84c91c1445a39d374cb68e55e4e3" output="C:\Users\matteo\AppData\Local\Temp\processing_083b6d735623475e9a59be854d8a7c0c\45a8e1dc7eb442728780ae595a52108f\output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
v.out.ogr type=auto input="draina50f84c91c1445a39d374cb68e55e4e3" output="C:\Users\matteo\AppData\Local\Temp\processing_083b6d735623475e9a59be854d8a7c0c\8b0e8989371c44c0bac99d8f7f07381e\drain.shp" format=ESRI_Shapefile --overwrite
Sto avviando GRASS GIS... 
ATTENZIONE: Il locking concorrente del mapset non è supportato in Windows. 
Executing <C:\Users\matteo\AppData\Local\Temp\processing_083b6d735623475e9a59be854d8a7c0c\grassdata\grass_batch_job.cmd> ... 

C:\PROGRA~1\QGIS3~1.0\bin>chcp 1252 1>NUL 

C:\PROGRA~1\QGIS3~1.0\bin>g.proj -c proj4="+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs" 
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 
Informazioni sulla proiezione aggiornate 

C:\PROGRA~1\QGIS3~1.0\bin>r.external input="C:\Users\matteo\Desktop\QGIS_data\dtm.tif" band=1 output="rast_5ad6e306154582" --overwrite -o 
La verifica della proiezione verrà ignorata 
Reading band 1 of 1... 
r.external completo. Link to raster map <rast_5ad6e306154582> created. 

C:\PROGRA~1\QGIS3~1.0\bin>g.region n=4924820.77 s=4678320.77 e=1771747.2310344942 w=1554747.2310344942 res=100.0 

C:\PROGRA~1\QGIS3~1.0\bin>r.drain input=rast_5ad6e306154582 start_coordinates=1660752.0286831865,4779236.023414794 [EPSG:3003] output=outputa50f84c91c1445a39d374cb68e55e4e3 drain=draina50f84c91c1445a39d374cb68e55e4e3 --overwrite 
Traces a flow through an elevation model or cost surface on a raster map. 

Usage: 
r.drain [-cand] input=name [direction=name] output=name [drain=name] 
[start_coordinates=east,north] [start_points=name[,name,...]] 
[--overwrite] [--help] [--verbose] [--quiet] [--ui] 

Flags: 
-c Copia i valori della cella in input sull'output 
-a Accumula i valori di input lungo il persorso 
-n Numera progressivamente le celle lungo il percorso 
-d The input raster map is a cost surface (direction surface must also be specified) 

Parameters: 
input Name of input elevation or cost surface raster map 
direction Name of input movement direction map associated with the cost surface 
output Nome del raster di output 
drain Name for output drain vector map 
start_coordinates Coordinates of starting point(s) (E,N) 
start_points Name of starting vector points map(s) 

ERROR: Sorry <[EPSG:3003]> is not a valid option 

C:\PROGRA~1\QGIS3~1.0\bin>g.region raster=outputa50f84c91c1445a39d374cb68e55e4e3 
ERRORE: Mappa raster <outputa50f84c91c1445a39d374cb68e55e4e3> non trovata 

C:\PROGRA~1\QGIS3~1.0\bin>r.out.gdal -t -m input="outputa50f84c91c1445a39d374cb68e55e4e3" output="C:\Users\matteo\AppData\Local\Temp\processing_083b6d735623475e9a59be854d8a7c0c\45a8e1dc7eb442728780ae595a52108f\output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite 
ERRORE: Mappa raster o gruppo <outputa50f84c91c1445a39d374cb68e55e4e3> non trovato 

C:\PROGRA~1\QGIS3~1.0\bin>v.out.ogr type=auto input="draina50f84c91c1445a39d374cb68e55e4e3" output="C:\Users\matteo\AppData\Local\Temp\processing_083b6d735623475e9a59be854d8a7c0c\8b0e8989371c44c0bac99d8f7f07381e\drain.shp" format=ESRI_Shapefile --overwrite 
ERRORE: Vettoriale <draina50f84c91c1445a39d374cb68e55e4e3> non trovato 

C:\PROGRA~1\QGIS3~1.0\bin>exit 
Execution of <C:\Users\matteo\AppData\Local\Temp\processing_083b6d735623475e9a59be854d8a7c0c\grassdata\grass_batch_job.cmd> finished. 
Cleaning up temporary files... 
Premere un tasto per continuare . . . 
Execution completed in 2.54 seconds
Results:
{'drain': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/matteo/AppData/Local/Temp/processing_083b6d735623475e9a59be854d8a7c0c/8b0e8989371c44c0bac99d8f7f07381e/drain.shp, 'createOptions': {'fileEncoding': 'System'}}>, 'output': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/matteo/AppData/Local/Temp/processing_083b6d735623475e9a59be854d8a7c0c/45a8e1dc7eb442728780ae595a52108f/output.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers
The following layers were not correctly generated.
C:/Users/matteo/AppData/Local/Temp/processing_083b6d735623475e9a59be854d8a7c0c/45a8e1dc7eb442728780ae595a52108f/output.tif
C:/Users/matteo/AppData/Local/Temp/processing_083b6d735623475e9a59be854d8a7c0c/8b0e8989371c44c0bac99d8f7f07381e/drain.shp
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.


  • operating_system was changed from to Windows

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Paolo Cavallini (@pcav)


Could you please check again on current release?
Thanks.

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Paolo Cavallini (@pcav)


I checked on 3.4.3 (Debian), it works correctly, even with EPSG code. Please test on Windows.

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Could you please check again on current release?
Thanks.

Please change status to "feedback" when needed.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 24, 2019

Author Name: Alexander Bruy (@alexbruy)


Works fine in master. Please reopen if necessary.


  • resolution was changed from to worksforme
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Jan 24, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS Regression Something which used to work, but doesn't anymore Easy fix labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Easy fix GRASS Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant