[GRASS-user] blog post on GRASS add-ons on Mac OSX
Hello all, Just to let you know that I made a post about compiling add-on for GRASS under OSX Lion: http://wp.me/p1fxDW-5Q cheers Carlos -- Prof. Carlos Henrique Grohmann Institute of Geosciences - Univ. of São Paulo, Brazil - Digital Terrain Analysis | GIS | Remote Sensing - http://carlosgrohmann.com (http://carlosgrohmann.com/) Can’t stop the signal. Sent with Sparrow (http://www.sparrowmailapp.com/?sig) ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
On Thu, 7 Jun 2012, Helmut Kudrnovsky wrote: sure, it's taken from http://www.surfaces.co.il/?p=241 Micha wrote an excellent description that answered a number of questions for me. Now I'm ready to try r.basin again and want to check the validity of my understanding of how I got where I now am and where it's going with r.basin. The input to r.stream.extract came from r.watershed with this command: r.watershed elev=dem_10m acc=facc drain=fdir basin=catch stream=str thresh=5 and was followed by r.stream.extract: r.stream.extract elev=dem_10m acc=facc thresh=1000 stream_rast=rstream stream_vect=vstream To find the sub-basin outlets, v.patch in=catchments,vstream out=basin_stream and v.clean in=basin_vstream out=basin_vstream_clean tool=break error=cross_points Prior to running v.out.ascii to save the cross_points in a text file I carefully manually deleted extraneious tiny sub-basins and cross_points at the confluences of stream channels. This reveals that many cross_points are not on sub-basin boundaries generated by r.watershed. In Micha's blog article the cross_points.txt file is used as input to r.water.outlet which generates the appropriate catchments. I assume this is also true for r.basin; i.e., it will generate its own basins and sub-basins based on the outlet points in the cross_points.txt file. Is this assumption correct? My thanks to Markus(M), Madi, Helmut, and Micha. Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Removing Multiple Maps
On Thu, 7 Jun 2012, John Ortiz wrote: If the maps that you want to remove have some (pattern) in the map name, you could remove it running this loop in the GRASS-Terminal. John, That's essentially what g.mremove does. For example, g.mremove rast="bas*" removes all raster maps beginning with 'bas'. Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Removing Multiple Maps
If the maps that you want to remove have some (pattern) in the map name, you could remove it running this loop in the GRASS-Terminal. Identified the path of the "hist" folder in your MAPSET path example : /home/user/Grassdata/location/Mapset/hist Now you could run: cd /home/user/Grassdata/location/Mapset/hist for i in *pattern*; do g.remove rast=$i done John Ortiz Geologist Smithsonian Tropical Research Institute Ancon - Panama > Date: Thu, 7 Jun 2012 10:41:11 -0700 > From: rshep...@appl-ecosys.com > To: grass-user@lists.osgeo.org > Subject: [GRASS-user] Removing Multiple Maps > >I'm re-doing my drainage basin analyses. There are several dozen raster > files in the mapset that I want to remove. Copying several to the g.remove > command (separated by commas) is slow. Is it possible to use a wildcard with > the g.remove command? > >My tests suggest not, but perhaps there is a way to do this that is not > immediately obvious to me. > > Rich > > ___ > 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] Removing Multiple Maps [SOLVED]
On Thu, 7 Jun 2012, Rich Shepard wrote: Is it possible to use a wildcard with the g.remove command? I just discovered g.mremove. Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Removing Multiple Maps
I'm re-doing my drainage basin analyses. There are several dozen raster files in the mapset that I want to remove. Copying several to the g.remove command (separated by commas) is slow. Is it possible to use a wildcard with the g.remove command? My tests suggest not, but perhaps there is a way to do this that is not immediately obvious to me. Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
David, On Thu, Jun 7, 2012 at 5:31 PM, David Montoya wrote: > Hi, I run the example of r.basin and I get this message at the end: > > Traceback (most recent call last): > File "/home/admin-lsc/Grass/Modulos/r.basin.py", line 427, in > sys.exit(main()) > File "/home/admin-lsc/Grass/Modulos/r.basin.py", line 235, in main > mainchannel = float(dict_mainchannel['Length']) / 1000 > KeyError: 'Length' > > > Which example do you refer to (exact commands and dataset)? and when did you download r.basin? On which OS and grass version? Regards, madi -- Dr. Margherita Di Leo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
Hi, I run the example of r.basin and I get this message at the end: Traceback (most recent call last): File "/home/admin-lsc/Grass/Modulos/r.basin.py", line 427, in sys.exit(main()) File "/home/admin-lsc/Grass/Modulos/r.basin.py", line 235, in main mainchannel = float(dict_mainchannel['Length']) / 1000 KeyError: 'Length' On Wed, Jun 6, 2012 at 5:12 PM, Helmut Kudrnovsky wrote: > >The other three go through the entire process then fail with > >the error message that the outlet needs to be on a stream channel created > by > >r.stream.extract. > > > > AFAIK from my r.basin-tests the outlet-point has to be exactly on stream > channel created by r.stream.extract > > > I use the same protocol on each sub-basin: zoom in very close to where > > the > >sub-basin boundary and stream channel cross, then note the x, y > coordinates > >from the status line on the display window frame. > > maybe following ML-disscussion could be helpfull to find the exact crossing > of stream and boundary: > > [GRASS-user] intersection between two lines vector to obtain points: > > http://lists.osgeo.org/pipermail/grass-user/2012-March/064062.html > http://lists.osgeo.org/pipermail/grass-user/2012-March/064063.html > > and then v.to.db to upload exact x,y-coordinates in the attribute table > > > > > - > best regards > Helmut > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/r-basin-Completes-on-Some-Basins-Fails-on-Others-tp4979599p4979607.html > Sent from the Grass - Users mailing list archive at Nabble.com. > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > -- David Montoya González Ing. Forestal, Universidad Nacional de Colombia Laboratorio de Sistemas Complejos, UNAL Medellin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
Hi Micha, The next addition might be how feed these crosspoints X and Y straight into > the easting and northing of r.basins... > > you mean something like (untested): #!/usr/bin/env python fin = open("crosspoints","r") fout = open("commands","w") linesout = (line.rstrip().split() for line in fin) cmd = 'r.basin map=dem prefix=bas%s easting=%s northing=%s threshold=1\n' fout.writelines(cmd % (n, easting, northing) for n,(easting,northing) in enumerate(linesout)) ? ciao madi -- Dr. Margherita Di Leo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
On 06/07/2012 12:16 PM, Helmut Kudrnovsky wrote: would you mind to write your suggestion in the r.basin wiki page[1]? done, please expand if needed Hi Helmut: I think you had a typo between the names crosspoints and crosspointscat in one line. I took the liberty of fixing, and changing a few other layer names for readability. If you could have a look to be sure it still reads correctly? The next addition might be how feed these crosspoints X and Y straight into the easting and northing of r.basins... BTW, thanks for mentioning my blog earlier in the thread :-) Regards, Micha - best regards Helmut -- View this message in context: http://osgeo-org.1560.n6.nabble.com/r-basin-Completes-on-Some-Basins-Fails-on-Others-tp4979599p4979677.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user This mail was received via Mail-SeCure System. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
>> v.clean tool=break > >Helmut, > > Good. That's what I chose. now there is a new and related wiki-entry (section Preparation, last paragraph) http://grass.osgeo.org/wiki/R.basin#Preparation - best regards Helmut -- View this message in context: http://osgeo-org.1560.n6.nabble.com/r-basin-Completes-on-Some-Basins-Fails-on-Others-tp4979599p4979751.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
On Wed, 6 Jun 2012, Helmut Kudrnovsky wrote: v.clean tool=break Helmut, Good. That's what I chose. Thanks, Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin ? for plane geometry of polygon shapefiles
Marco, On Thu, Jun 7, 2012 at 1:15 PM, Marco wrote: > Hi Margherita, > > Grazie. Its not related to hydrology. I just want to get some shape > indexes to characterize networks of polygons (periglacial patterned ground). > I came to your Grass Add-on because the indexes used in 2D basin > morphometry are really adequate to characterize each individual polygon. > > I have already used SAGA GIS and GVSig, which automatically supply shape > parameters relating the perimeter of the polygon to its area in various > ways. And that´s already fine information. > From that I know if the polygon is more elongated or more circular. And > maybe more information won´t add to much... But I still would like to try. > Mainly because of the indexes which grab the axis and which relate the > polygon to and ideal shape. > > Maybe I should focus on doing one thing at a time: 1) axis calculation; > and 2) deriving the ideal shape from the centroid of the polygon. Then > I´d have great information. > Have you seen v.to.db[1]? It allows you to calculate some parameters such as area, perimeter, compactness, fractal dimension, etc. > > My next step is to go inside you python code (of which I know little) and > try to extract the relevant pieces. > The code is quite self-explanatory and the formulas are very simple so that you could also calculate some parameters in a spreadsheet, anyways if you need further information don't hesitate to ask. > > Thank you. > Marco > (gonna start a MSc related to cryosphere geomorphology next Fall) > Congrats ;-) ciao madi [1] http://grass.osgeo.org/gdp/html_grass64/v.to.db.html -- Dr. Margherita Di Leo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin ? for plane geometry of polygon shapefiles
Hi Margherita, Grazie. Its not related to hydrology. I just want to get some shape indexes to characterize networks of polygons (periglacial patterned ground). I came to your Grass Add-on because the indexes used in 2D basin morphometry are really adequate to characterize each individual polygon. I have already used SAGA GIS and GVSig, which automatically supply shape parameters relating the perimeter of the polygon to its area in various ways. And that´s already fine information. From that I know if the polygon is more elongated or more circular. And maybe more information won´t add to much... But I still would like to try. Mainly because of the indexes which grab the axis and which relate the polygon to and ideal shape. Maybe I should focus on doing one thing at a time: 1) axis calculation; and 2) deriving the ideal shape from the centroid of the polygon.Then I´d have great information. My next step is to go inside you python code (of which I know little) and try to extract the relevant pieces. Thank you. Marco (gonna start a MSc related to cryosphere geomorphology next Fall) From: Margherita Di Leo To: Marco Jorge Cc: "grass-user@lists.osgeo.org" Sent: Thursday, June 7, 2012 11:26 AM Subject: Re: [GRASS-user] r.basin ? for plane geometry of polygon shapefiles Hi Marco, On Tue, Jun 5, 2012 at 4:54 PM, Marco Jorge wrote: Hi, > > >I have 10k small polygons stored in a shapefile and in raster format (nr >classes = nr of basins). >I am interested in getting some planar geometry information for each polygon. I have 3 problems, not considering the lack of knowledge: > > >- no DTM; >- no channels; >- try to foul r.basin with the shapefile > > >Can you think of a way to pick the module and its code to calculate the >indices in the end of the post? >Can anyone point me a way to pick up the major axis instead of the lenght of >the main channel ? >Any hint on major (or minor) axis extraction? > > >Should I try other approach? To me, it's not clear what you are trying to get. If your aim is to perform a hydrological analysis, you do need a DEM, and you can easily download i.e. an ASTER GDEM for your area and then use r.basin. If your analysis it's not related to hydrology, and you just need some "shape indexes", what you should do is probably related to what you are trying to achieve.. Can you explain a little more? Regards, madi -- Dr. Margherita Di Leo___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] wingrass daily builds temporary down
Hi all, due to technical difficulties in our server room, the Windows server where winGRASS daily builds are generated is down. I hope to make it working again on Monday/Tuesday. Martin -- Martin Landa * 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] r.basin ? for plane geometry of polygon shapefiles
Hi Marco, On Tue, Jun 5, 2012 at 4:54 PM, Marco Jorge wrote: > Hi, > > I have 10k small polygons stored in a shapefile and in raster format (nr > classes = nr of basins). > I am interested in getting some planar geometry information for each > polygon. > I have 3 problems, not considering the lack of knowledge: > > - no DTM; > - no channels; > - try to foul r.basin with the shapefile > > Can you think of a way to pick the module and its code to calculate the > indices in the end of the post? > Can anyone point me a way to pick up the major axis instead of the lenght > of the main channel ? > Any hint on major (or minor) axis extraction? > > Should I try other approach? > To me, it's not clear what you are trying to get. If your aim is to perform a hydrological analysis, you do need a DEM, and you can easily download i.e. an ASTER GDEM for your area and then use r.basin. If your analysis it's not related to hydrology, and you just need some "shape indexes", what you should do is probably related to what you are trying to achieve.. Can you explain a little more? Regards, madi -- Dr. Margherita Di Leo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
>would you mind to write your suggestion in the r.basin wiki page[1]? done, please expand if needed - best regards Helmut -- View this message in context: http://osgeo-org.1560.n6.nabble.com/r-basin-Completes-on-Some-Basins-Fails-on-Others-tp4979599p4979677.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
>would you mind to write your suggestion in the r.basin wiki page[1]? >Thanks! sure, it's taken from http://www.surfaces.co.il/?p=241 - best regards Helmut -- View this message in context: http://osgeo-org.1560.n6.nabble.com/r-basin-Completes-on-Some-Basins-Fails-on-Others-tp4979599p4979663.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
Hi, I get a similar issue some time ago (but with a vector input) and wrote a little script to work only with raster (no need to transform back to vector) it's using r.distance ( http://grass.osgeo.org/grass64/manuals/html64_user/r.distance.html), wich "Locates the closest points between objects in two raster maps" and output an ascii line with the intersection point ... you just need to input your 2 raster with basin boundaries and streams, and it will do the job for all your objects at once ;) Cheers, Sylvain 2012/6/6 Rich Shepard > Running r.basin using r.to.vect basin boundaries and r.to.vect > r.stream.extract weighted streams (but same issue using unweighted > streams). > So far, of 7 sub-basins on which I've run the module only 4 complete > successfully. The other three go through the entire process then fail with > the error message that the outlet needs to be on a stream channel created > by > r.stream.extract. > > I use the same protocol on each sub-basin: zoom in very close to where the > sub-basin boundary and stream channel cross, then note the x, y coordinates > from the status line on the display window frame. > > What might account for this same process, using the same r.stream.extract > map, to work on some sub-basins and fail on others? > > Rich > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others
Helmut, would you mind to write your suggestion in the r.basin wiki page[1]? Thanks! ciao madi [1] http://grass.osgeo.org/wiki/R.basin On Thu, Jun 7, 2012 at 8:24 AM, Helmut Kudrnovsky wrote: > v.clean tool=break > > - > best regards > Helmut > -- > -- Dr. Margherita Di Leo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user