[GRASS-user] First steps in GRASS GIS
Hello I'am new in GRASS and I'm looking for some help and advice. As a private user in which mapset should I start working - PERMANENT or another. I have already created my Location with one mapset. I have to import and process ASCII text files from lidar data, but I'm not sure how and what to be careful for. For example topology or do I have to create any database tables for imported points. Thank you! Regards, Adrian Kirilov ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Exercises and Tutorials for GRASS GIS
Hello to all GRASS GIS users, My name is Adrian Kirilov. I'm currently student and I'm making my thesis this semester. I have to use GIS software for it and I decided to use GRASS GIS. I have to work with vector data and specifically with ASCII text files from lidar processed data. The problem is that I'm completely new in GRASS and I want to advance as fast as possible in it. I was looking for something like exercises starting from scratch but without success. I don't even know how to start the project with vector data from scratch. Thank you in advance and I'm looking forward for your answer! Regards, Adrian Kirilov ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Transform Reclass Map into a real Raster Map (Modeler)
Luis Miguel Royo Perez wrote: i'm in a trouble, i would like transform a reclass map into a real raster map, but i don't know how to do. 1st.- I don't know if with tool /r.mapcalculator/ i can enter the expression */r.mapcalc raster_map=reclass_map/* I know i can enter mapcalc expressions into mapcalulator with *-e flag*, but i don't know how exactly do it. 2nd.-I don't know if there's another way to reach what i want. r.resample input=reclass_map output=raster_map -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
Hi Allar, On Tue, Apr 9, 2013 at 4:20 PM, Allar Haav allar.h...@gmail.com wrote: The GRASS 7 I'm running currently however is a week-old r55595-540 as the later ones have been giving the error regarding pygrass and g.region at startup. Could this be the key to my issue? Can you provide the code that you are using? As I said in grass-dev[0], at the moment the shortcuts are not working properly. Pietro [0] http://lists.osgeo.org/pipermail/grass-dev/2013-April/062894.html ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Python placeholder (%d) in stdin statement of db.execute
Hi, I am just struggling with a code line. I want to assign a value to all cells of a defined column. Thus I try to run in python: probvalue=100.0 grass.write_command(db.execute,stdin = UPDATE my_points SET prob=%d %(probvalue)) So far I checked that the string for stdin is generated correctly: UPDATE my_points SET prob=%d %(probvalue) UPDATE my_points SET prob=100 However the column is not updated. When executing the sql line directly in db.execute (GUI) everything works and the column shows 100 for all rows. Any hints? I have tried this on GRASS 7, Ubuntu, Python 2.7.3 /Johannes ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Exercises and Tutorials for GRASS GIS
Hi Adrian, first welcome the the GRASS world. A good start to begin with is the GRASS website (http://grass.osgeo.org/) and the GRASS wiki which also includes a chapter about how to get started: grasswiki.osgeo.org/wiki/GRASS_Help. /Johannes On Wed, Apr 10, 2013 at 1:06 PM, Adrian Kirilov kirilov.adr...@gmail.comwrote: Hello to all GRASS GIS users, My name is Adrian Kirilov. I'm currently student and I'm making my thesis this semester. I have to use GIS software for it and I decided to use GRASS GIS. I have to work with vector data and specifically with ASCII text files from lidar processed data. The problem is that I'm completely new in GRASS and I want to advance as fast as possible in it. I was looking for something like exercises starting from scratch but without success. I don't even know how to start the project with vector data from scratch. Thank you in advance and I'm looking forward for your answer! Regards, Adrian Kirilov ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
Hi, As for the latest compiled WinGRASS7, which at the moment (from osgeo4w) is r55677-547, then this gives the error right at the startup of grass7 (i.e. after g.gui command): GRASS 7.0.svn Traceback (most recent call last): File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\wxgui.py, line 34, in module from lmgr.frame import GMFrame File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\frame.py, line 69, in module from lmgr.pyshell import PyShellWindow File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\pyshell.py, line 27, in module import grass.pygrass as pygrass File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\__init__.py, line 17, in module import modules File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\__init__.py, line 11, in module import grid File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\__init__.py, line 9, in module import grid File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\grid.py, line 20, in module _GREG = Module('g.region') File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\interface\module.py, line 87, in __init__ raise GrassError(str_err % self.name) grass.pygrass.errors.GrassError: Module 'g.region' not found, please check that the module exist Therefore I've been using an older build (r55595-540) with which I have this curious vector layer deletion issue (which I'm sure I didn't have a few weeks ago at least). It doesn't matter whether I try to do it in a script or not, g.remove does not remove vector layers completely. It seems to get stuck with hist file. There is a chance though that the issue isn't apparent in a newer build. One probable solution would be moving on to Unix though. Allar On 10/04/2013 12:22, Pietro wrote: Hi Allar, On Tue, Apr 9, 2013 at 4:20 PM, Allar Haav allar.h...@gmail.com wrote: The GRASS 7 I'm running currently however is a week-old r55595-540 as the later ones have been giving the error regarding pygrass and g.region at startup. Could this be the key to my issue? Can you provide the code that you are using? As I said in grass-dev[0], at the moment the shortcuts are not working properly. Pietro [0] http://lists.osgeo.org/pipermail/grass-dev/2013-April/062894.html ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
On Tue, Apr 9, 2013 at 5:20 PM, Allar Haav allar.h...@gmail.com wrote: Hi, and thanks for answering. Well, it seems that I've been so preoccupied with my current acticity that I missed the real issue which is apparently much wider and weirder. So, indeed, nothing to do with database tables and r.drain. Apparently, deleting any vector layer gives me the error when using g.remove. I tried creating a new location and mapset, but ran into the same problem. When removing a vector layer the hist, sidx and topo files aren't deleted. I figured it could have something to do with user rights and ran the same operation as an admin, but to no avail. No such issue with GRASS 6 though. This bug has been introduced recently with r55401. I fixed r55401 in r55681. Markus M The GRASS 7 I'm running currently however is a week-old r55595-540 as the later ones have been giving the error regarding pygrass and g.region at startup. Could this be the key to my issue? Cheers, Allar On 09/04/2013 15:01, Markus Metz wrote: On Tue, Apr 9, 2013 at 3:21 PM, Allar Haav allar.h...@gmail.com wrote: Hi, Several modules (for example, r.drain) produce vector layers that are to some extent broken, at least in WinGRASS 7. Most probably something to do with database connections as these seem to be missing for them. Database connections are optional for vector maps. Why do you think the vector map created by r.drain is broken? What do v.info and v.category op=report say? The vector map created by r.drain does not have a database connection, thus also no attribute table. You can add a table with v.db.addtable if you want to upload some attributes. Anyway, I still need to use the output files and I've been creating db tables for them manually. While they are usable after that, it is nevertheless impossible to get rid of them afterwards. Using g.remove, the sample command output is as follows: Removing vector vectpath@PERMANENT WARNING: Unable to delete file 'C:\GIS\GRASS/Kuigatsi/PERMANENT/vector/vectpath/hist' WARNING: Unable to delete vector map WARNING: vectpath nothing removed (Tue Apr 09 13:58:29 2013) Command finished (0 sec) How exactly did you create db tables? The commands you used are needed to reproduce and fix the problem. Markus M So far the only way of removing those layers is just deleting their actual files, but this isn't a good workaround as I'm trying to use it in a Python script. Is there any better way to force the removal of those layers? Regards, Allar ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
On Wed, Apr 10, 2013 at 2:05 PM, Allar Haav allar.h...@gmail.com wrote: Hi, As for the latest compiled WinGRASS7, which at the moment (from osgeo4w) is r55677-547, then this gives the error right at the startup of grass7 (i.e. after g.gui command): GRASS 7.0.svn Traceback (most recent call last): File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\wxgui.py, line 34, in module from lmgr.frame import GMFrame File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\frame.py, line 69, in module from lmgr.pyshell import PyShellWindow File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\pyshell.py, line 27, in module import grass.pygrass as pygrass File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\__init__.py, line 17, in module import modules File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\__init__.py, line 11, in module import grid File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\__init__.py, line 9, in module import grid File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\grid.py, line 20, in module _GREG = Module('g.region') File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\interface\module.py, line 87, in __init__ raise GrassError(str_err % self.name) grass.pygrass.errors.GrassError: Module 'g.region' not found, please check that the module exist IMHO it is a very bad idea to load pygrass together with the gui, as bad as loading nviz or anything else that uses ctypes when the gui is loaded. Anything that uses ctypes should be started upon user request as a separate process. I am going to revert r55395 (tested on Windows). Markus M Therefore I've been using an older build (r55595-540) with which I have this curious vector layer deletion issue (which I'm sure I didn't have a few weeks ago at least). It doesn't matter whether I try to do it in a script or not, g.remove does not remove vector layers completely. It seems to get stuck with hist file. There is a chance though that the issue isn't apparent in a newer build. One probable solution would be moving on to Unix though. Allar On 10/04/2013 12:22, Pietro wrote: Hi Allar, On Tue, Apr 9, 2013 at 4:20 PM, Allar Haav allar.h...@gmail.com wrote: The GRASS 7 I'm running currently however is a week-old r55595-540 as the later ones have been giving the error regarding pygrass and g.region at startup. Could this be the key to my issue? Can you provide the code that you are using? As I said in grass-dev[0], at the moment the shortcuts are not working properly. Pietro [0] http://lists.osgeo.org/pipermail/grass-dev/2013-April/062894.html ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
Thank you! Probably this and the change in r55681 resolve my issues. Allar On 10/04/2013 13:45, Markus Metz wrote: IMHO it is a very bad idea to load pygrass together with the gui, as bad as loading nviz or anything else that uses ctypes when the gui is loaded. Anything that uses ctypes should be started upon user request as a separate process. I am going to revert r55395 (tested on Windows). Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
On Wed, Apr 10, 2013 at 2:45 PM, Markus Metz markus.metz.gisw...@gmail.com wrote: On Wed, Apr 10, 2013 at 2:05 PM, Allar Haav allar.h...@gmail.com wrote: Hi, As for the latest compiled WinGRASS7, which at the moment (from osgeo4w) is r55677-547, then this gives the error right at the startup of grass7 (i.e. after g.gui command): GRASS 7.0.svn Traceback (most recent call last): File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\wxgui.py, line 34, in module from lmgr.frame import GMFrame File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\frame.py, line 69, in module from lmgr.pyshell import PyShellWindow File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\lmgr\pyshell.py, line 27, in module import grass.pygrass as pygrass File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\__init__.py, line 17, in module import modules File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\__init__.py, line 11, in module import grid File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\__init__.py, line 9, in module import grid File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\grid\grid.py, line 20, in module _GREG = Module('g.region') File C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass\pygrass\modules\interface\module.py, line 87, in __init__ raise GrassError(str_err % self.name) grass.pygrass.errors.GrassError: Module 'g.region' not found, please check that the module exist IMHO it is a very bad idea to load pygrass together with the gui, as bad as loading nviz or anything else that uses ctypes when the gui is loaded. Anything that uses ctypes should be started upon user request as a separate process. I am going to revert r55395 (tested on Windows). r55395 has been reverted with r55682. With the next nightly build, wingrass should work again, including GUI and deleting vectors. Markus M Therefore I've been using an older build (r55595-540) with which I have this curious vector layer deletion issue (which I'm sure I didn't have a few weeks ago at least). It doesn't matter whether I try to do it in a script or not, g.remove does not remove vector layers completely. It seems to get stuck with hist file. There is a chance though that the issue isn't apparent in a newer build. One probable solution would be moving on to Unix though. Allar On 10/04/2013 12:22, Pietro wrote: Hi Allar, On Tue, Apr 9, 2013 at 4:20 PM, Allar Haav allar.h...@gmail.com wrote: The GRASS 7 I'm running currently however is a week-old r55595-540 as the later ones have been giving the error regarding pygrass and g.region at startup. Could this be the key to my issue? Can you provide the code that you are using? As I said in grass-dev[0], at the moment the shortcuts are not working properly. Pietro [0] http://lists.osgeo.org/pipermail/grass-dev/2013-April/062894.html ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] First steps in GRASS GIS
Adrian, I think it would be very helpful to you to work through some of the available tutorials available here: http://grass.osgeo.org/documentation/tutorials/ before going further. I also HIGHLY recommend purchasing: M. Neteler, H. Mitasova, 2008. Open Source GIS: A GRASS GIS Approach. Third edition http://www.grassbook.org/. 420 pages, Springer, New York (ISBN-10: 038735767X; ISBN-13: 978-0387357676) referenced here: http://grass.osgeo.org/documentation/books/ Other books are available, too. Regards, Tom On Wed, Apr 10, 2013 at 6:58 AM, Adrian Kirilov kirilov.adr...@gmail.comwrote: Hello I'am new in GRASS and I'm looking for some help and advice. As a private user in which mapset should I start working - PERMANENT or another. I have already created my Location with one mapset. I have to import and process ASCII text files from lidar data, but I'm not sure how and what to be careful for. For example topology or do I have to create any database tables for imported points. Thank you! Regards, Adrian Kirilov ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] GRASS6.4 Problem with v.db.addcol
Dear all, As I explained in my previous post, I have some troubles using v.db.addcol (see below). After making different tests, I realized there is a problem using script with v.db.addcol. I tried the following script: #!/bin/bash v.db.addcol map=extracting_point_ETo_RFE_test columns=RF_2001001 double precision --overwrite And I received the following error message GRASS 6.4.2 (Merti_WGS84_dd) bash list_extract_RFE.sh list_extract_RFE.sh: line 2: v.db.addcol: command not found The command is working when I write it in the shell... but I don't want to do it 2000 times!!! Im using GRASS 6.4 on windows. do someone has an idea where the problem comes from? thanks Lucien De : grass-user-boun...@lists.osgeo.org [grass-user-boun...@lists.osgeo.org] de la part de BLANDENIER Lucien [lucien.blanden...@unine.ch] Date d'envoi : mercredi 10 avril 2013 16:09 À : Marco Sciaini; grass-user@lists.osgeo.org Objet : [GRASS-user] RE : Fwd: GRASS 6.4 How to extract point-valuesfrom multiple rasters Dear Marco, Thank you for your answer and your script. I tried it but I meet some problem. I used the script : for A_Raster in $( eval g.mlist type=rast mapset=RFE_test ) do v.db.addcol extracting_point_ETo_RFE_test columns=$A_Raster double precision --overwrite v.what.rast vector=extracting_point_ETo_RFE_test raster=$A_Raster column=$A_Raster --overwrite echo Spatial query of $A_Raster finished at $(date) done and I receive the following error message for each raster of my mapset : extract_PointValue_from_RFE_raster.sh: line 13: v.db.addcol: command not found ERREUR :Colonne RFE_2001001 non trouvÚe Spatial query of RFE_2001001 finished at Wed Apr 10 13:54:36 GMT 2013 extract_PointValue_from_RFE_raster.sh: line 13: v.db.addcol: command not found ERREUR :Colonne RFE_2001002 non trouvÚe Spatial query of RFE_2001002 finished at Wed Apr 10 13:54:36 GMT 2013 ... I separated commands (v.db.addcol extracting_point_ETo_RFE_test columns=test double precision) and it worked Do someone has an idea of the problem? thanks Lucien De : grass-user-boun...@lists.osgeo.org [grass-user-boun...@lists.osgeo.org] de la part de Marco Sciaini [sciaini.ma...@gmail.com] Date d'envoi : jeudi 4 avril 2013 16:58 À : grass-user@lists.osgeo.org Objet : [GRASS-user] Fwd: GRASS 6.4 How to extract point-values from multiple rasters Dear Lucien, here is a little bash script, which updates the attribut-table from your vector file and add all extracted values from multiple rasters in a mapset. for A_Raster in $( eval g.mlist type=rast mapset=... ) do v.db.addcol map=... columns=$A_Raster double precision --overwrite v.what.rast vector=... raster=$A_Raster column=$A_Raster --overwrite echo Spatial query of $A_Raster finished at $(date) done Kind regards Marco ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Python placeholder (%d) in stdin statement of db.execute
Hi, I just tested it again and realized this problem is not related to the placeholder in the python code, but probably an other issue of my pythoncode line nothing is update when use: grass.write_command(db.execute, stdin = UPDATE my points SET prob=100) but using UPDATE my points SET prob=100 in the module GUI works as mentioned already before. Has anyone experience in using db.execute in python with standard input in GRASS7? /Johannes ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
Hi, On 10 April 2013 14:45, Markus Metz markus.metz.gisw...@gmail.com wrote: IMHO it is a very bad idea to load pygrass together with the gui, as bad as loading nviz or anything else that uses ctypes when the gui is loaded. Anything that uses ctypes should be started upon user request as a separate process. I am going to revert r55395 (tested on Windows). The whole r55395 was more or less an experiment (let's leave it reverted). But don't understand what caused the error (and how it is related to pygrass import). Moreover, I think that pygrass.modules module does not use ctypes. So, pygrass.modules itself (withou the rest of pygrass) is not dangerous from this point of view. There are some other problems such as slower start of the GUI. Vaclav ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to force remove broken vector layers?
Hi, 2013/4/10 Markus Metz markus.metz.gisw...@gmail.com: This bug has been introduced recently with r55401. I fixed r55401 in r55681. ops, thanks for the fix. Martin -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Again: Failed to identify satellite
2013/4/11 Markus Neteler nete...@osgeo.org: This requires a newer 6.4.svn snapshot installation. I think that it is time for 6.4.3RC3... agreed, ideally after RC3 should come 6.4.3. Unfortunately we have still one blocker left [1]. Martin [1] http://trac.osgeo.org/grass/query?status=newstatus=assignedstatus=reopenedgroup=typeorder=prioritypriority=blockerpriority=criticalmilestone=6.4.3milestone=6.4.2milestone=6.4.1milestone=6.4.0 -- Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user