Re: [GRASS-user] Using Python in GRASS GIS for analysis
Hello On Wed, Feb 3, 2021 at 8:51 AM Omkar Kadlag wrote: > Hello Sir/Ma'am, > > Warm Greetings. > > > Then I made a new environment in the anaconda prompt, where I installed > 'wxpython' and was successfully able to run GRASS GIS software, but now the > issue is I can't use the command prompt for my analysis. Then I tried to > give inputs in the anaconda command prompt but was still unable to get > correct outputs. > > First I think you are mixing up running GRASS commands in python, versus the command prompt. You do not necessarily need python (nor Anaconda) to run GRASS. Everything can be done from the command prompt or using the GRASS GUI. Furthermore, it's a good idea, in my opinion, to begin learning the GRASS modules by running commands at the command prompt, then once you have the details worked out, shift to writing python scripts. > C:\Program Files>r.in.gdal -e > input="D:\NRSC\Month_Jan\ASTGTMV003_N19E073-dem" output=DEM > ERROR: Unable to open datasource > C:\Program Files> > > Here, clearly you did not specify the full file name to the ASTER DEM file. Probably the ".TIF" extension is missing? Can you check and enter the full file name, then get back to the list if you encounter any more problems. I want solutions where I can run GRASS GIS directly from the command line > and implement my solutions on that. > > Yours Sincerely, > Omkar. > ___ > grass-user mailing list > grass-user@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user > -- Micha Silver Ben Gurion Univ Sde-Boker Remote Sensing Lab cell: +972 (52) 3665918 ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Using Python in GRASS GIS for analysis
Hello Sir/Ma'am, Warm Greetings. I am Omkar Kadlag from Mumbai,India.I am pursuing Electronics and Telecommunication Engineering majors from K.J.Somaiya Institute of Engineering and Information Technology,Mumbai. I am working on a project "Watershed Analysis using python". While using GRASS GIS python console for analysis, I'm unable to get desired results. While giving the input ( as a DEM tile ) in the PowerShell prompt of GRASS GIS Software, it gives an error, as 'wxpython file' is not available. Error - Starting GRASS GIS... Traceback (most recent call last): File "C:\Program Files\GRASS GIS 7.8\gui\wxpython\gis_set.py", line 43, in from core.gcmd import GMessage, GError, DecodeString, RunCommand File "C:\Program Files\GRASS GIS 7.8\gui\wxpython\core\gcmd.py", line 43, in from win32file import ReadFile, WriteFile ImportError: DLL load failed: The specified procedure could not be found. ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers. On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed. To run GRASS GIS in text mode use the --text flag. Use '--help' for further options grass78 --help See also: https://grass.osgeo.org/grass78/manuals/helptext.html Exiting... Press any key to continue . . . Then I made a new environment in the anaconda prompt, where I installed 'wxpython' and was successfully able to run GRASS GIS software, but now the issue is I can't use the command prompt for my analysis. Then I tried to give inputs in the anaconda command prompt but was still unable to get correct outputs. Error: (base) PS C:\Users\Omkar> conda activate geopandas_env (geopandas_env) PS C:\Users\Omkar> cd 'C:\Program Files\' (geopandas_env) PS C:\Program Files> grass78 --gui Starting GRASS GIS... WARNING: Concurrent mapset locking is not supported on Windows Cleaning up temporary files... __ ___ _____ / / __ \/ | / ___/ ___/ / / _/ ___/ / / __/ /_/ / /| | \__ \\_ \ / / __ / / \__ \ / /_/ / _, _/ ___ |___/ /__/ / / /_/ // / ___/ / \/_/ |_/_/ |_/// \/___/// Welcome to GRASS GIS 7.8.5 GRASS GIS homepage: https://grass.osgeo.org This version running through:Command Prompt (C:\WINDOWS\system32\cmd.exe) Help is available with the command: g.manual -i See the licence terms with: g.version -c See citation options with: g.version -x If required, restart the GUI with: g.gui wxpython When ready to quit enter:exit Launching GUI in the background, please wait... Microsoft Windows [Version 10.0.19042.746] (c) 2020 Microsoft Corporation. All rights reserved. C:\Program Files>r.in.gdal -e input="D:\NRSC\Month_Jan\ASTGTMV003_N19E073-dem" output=DEM ERROR: Unable to open datasource C:\Program Files> I want solutions where I can run GRASS GIS directly from the command line and implement my solutions on that. Yours Sincerely, Omkar. ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Using Python in GRASS GIS for analysis
Hello Omkar, if you want to get any answer, include errors as a text in the body of your email instead of images. Just select the error in your console and paste into email. Good luck, Māris. ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.rast.stats error: "Unable to seek"
Hi again Luis, The error comes from v.to.rast (which is used inside v.rast.stats). From the error message (which suggests that the G_fseek() function gets an invalid argument), it occurs most likely here: https://github.com/OSGeo/grass/blob/master/lib/gis/seek.c However, the root cause may be at a different place... Could you try: a) if assigning more memory to v.to.rast has any effect v.to.rast input=PSU output=test use=cat memory=1 b) if assigning category values to the raster causes problems v.to.rast input=PSU output=test use=val value=1 in order to narrow down a bit? Please also report v.info PSU -c (to see data types of the columns)... Anyway, I guess here are people with C-knowledge required... Cheers Stefan -Original Message- From: Luís Moreira de Sousa Sent: tirsdag 2. februar 2021 15:56 To: Stefan Blumentrath Cc: Micha Silver ; GRASS user list Subject: RE: [GRASS-user] v.rast.stats error: "Unable to seek" Thank you all for various replies. Some reactions: 1. The workstation has 32 GB of RAM and 12 CPU. What is the expected RAM requirements for v.rast.stats? 2. v.to.rast also fails, see below. 3. What would be the way to check the health of the vector? The table in Postgres at least is fully usable. > v.to.rast input=PSU output=test use=cat ERROR: Unable to seek: Invalid argument -- Luís ‐‐‐ Original Message ‐‐‐ On Monday, February 1, 2021 11:56 PM, Stefan Blumentrath wrote: > > So the vector contains about 20 million polygons, and the raster about 8 > billion cells. (~=32GB ?) > > Does you computer have enough muscle for this? > ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.rast.stats error: "Unable to seek"
Thank you all for various replies. Some reactions: 1. The workstation has 32 GB of RAM and 12 CPU. What is the expected RAM requirements for v.rast.stats? 2. v.to.rast also fails, see below. 3. What would be the way to check the health of the vector? The table in Postgres at least is fully usable. > v.to.rast input=PSU output=test use=cat ERROR: Unable to seek: Invalid argument -- Luís ‐‐‐ Original Message ‐‐‐ On Monday, February 1, 2021 11:56 PM, Stefan Blumentrath wrote: > > So the vector contains about 20 million polygons, and the raster about 8 > billion cells. (~=32GB ?) > > Does you computer have enough muscle for this? > ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user