Re: [GRASS-user] Re: Grass 6.4.2 on Ubuntu 11.10
On Tue, Mar 6, 2012 at 7:31 AM, Bulent Arikan bulent.ari...@gmail.com wrote: Thank you for your input. Yes, I misspoke: I should have said that I was looking for relatively bug-free version of GRASS for Linux. I must also mention that the version of Linux installed on computers is beyond my control since it is a lab maintained by others. The version the computers are running is Ubuntu 10.10 32 bit ( https://launchpad.net/+help-soyuz/ppa-sources-list.html ). The archaic looking GRASS 6.4 came from ( https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable ): they reached this link from the following address ok, sorry that Ubuntu didn't update yet to the latest and greated 6.4.2... We cannot do much about this. ( http://grass.fbk.eu/download/software.php#g64x ). I realize that this is a mirror site in Europe The master site is here: http://grass.osgeo.org/download/software.php#g64x and I think that this last link has some problematic versions of GRASS. (note that is unrelated if you go to a mirror or the main site) I had Windows version (6.4) installed from this address for my class last semester and there were a lot of problems with mapcalc, gregion, and v.in.ogr. Yes. But we have worked on this to make it better and released GRASS 6.4.2 recently: http://grass.osgeo.org/announces/announce_grass642.html ... This release includes over 770 updates to the source code since 6.4.1. For sure interesting for you. ... Meanwhile, can anyone suggest a link for GRASS 6.4 for the version of Ubuntu I have to work with? You may try the weekly binary snapshot: http://grass.osgeo.org/download/software.php#g64x - Binaries - Generic weekly snapshot I hope it is sufficiently compliant with Ubuntu since it is generated on a Debian machine. Sooner of later Ubuntu will update as well. Best Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: installing addons grass 6.4.3svn-ubuntu 11.10
Problem solved by compiling grass with debian rules (For newbies like me: go to svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian and just follow the instructions) -- View this message in context: http://osgeo-org.1560.n6.nabble.com/installing-addons-grass-6-4-3svn-ubuntu-11-10-tp4498897p4550701.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
[GRASS-user] Error running r.reclass in python script with stdin
Hi, I try to run a python script including the r.reclass command with stdin. I am running GRASS 6.5.svn50782M (2012) on a Mac OSX. The part of the script is: grass.run_command(r.reclass, input = Treene_tmp_mask1, rules = -, stdin = '1 thru 999 = 1 1', output = Treene_mask_2) and the error: Traceback (most recent call last): File /Users/Johannes Radinger/Desktop/SDM_V2R.py, line 92, in module sys.exit(main()) File /Users/Johannes Radinger/Desktop/SDM_V2R.py, line 68, in main output = Treene_mask_2) File /Applications/GRASS-6.5.app/Contents/MacOS/etc/pytho n/grass/script/core.py, line 189, in run_command ps = start_command(*args, **kwargs) File /Applications/GRASS-6.5.app/Contents/MacOS/etc/pytho n/grass/script/core.py, line 177, in start_command return Popen(args, **popts) File /Applications/GRASS-6.5.app/Contents/MacOS/etc/pytho n/grass/script/core.py, line 56, in __init__ startupinfo, creationflags) File /Library/Frameworks/Python.framework/Versions/2.6/li b/python2.6/subprocess.py, line 616, in __init__ errread, errwrite) = self._get_handles(stdin, stdout, stderr) File /Library/Frameworks/Python.framework/Versions/2.6/li b/python2.6/subprocess.py, line 973, in _get_handles p2cread = stdin.fileno() AttributeError: 'str' object has no attribute 'fileno' What I am doing wrong or is there a bug in the code? best regards, Johannes -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error running r.reclass in python script with stdin
On 06/03/12 11:42, Johannes Radinger wrote: Hi, I try to run a python script including the r.reclass command with stdin. I am running GRASS 6.5.svn50782M (2012) on a Mac OSX. The part of the script is: grass.run_command(r.reclass, input = Treene_tmp_mask1, rules = -, stdin = '1 thru 999 = 1 1', output = Treene_mask_2) and the error: Traceback (most recent call last): File /Users/Johannes Radinger/Desktop/SDM_V2R.py, line 92, inmodule sys.exit(main()) File /Users/Johannes Radinger/Desktop/SDM_V2R.py, line 68, in main output = Treene_mask_2) File /Applications/GRASS-6.5.app/Contents/MacOS/etc/pytho n/grass/script/core.py, line 189, in run_command ps = start_command(*args, **kwargs) File /Applications/GRASS-6.5.app/Contents/MacOS/etc/pytho n/grass/script/core.py, line 177, in start_command return Popen(args, **popts) File /Applications/GRASS-6.5.app/Contents/MacOS/etc/pytho n/grass/script/core.py, line 56, in __init__ startupinfo, creationflags) File /Library/Frameworks/Python.framework/Versions/2.6/li b/python2.6/subprocess.py, line 616, in __init__ errread, errwrite) = self._get_handles(stdin, stdout, stderr) File /Library/Frameworks/Python.framework/Versions/2.6/li b/python2.6/subprocess.py, line 973, in _get_handles p2cread = stdin.fileno() AttributeError: 'str' object has no attribute 'fileno' What I am doing wrong or is there a bug in the code? You have to use grass.write_command to be able to use stdin. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Possible bug in r.sum and in r.stats?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I get the following output as seen on the screenshot. My setup: one mapset PERMANENT (linked), one mapset in which the map is, executed from mapset ANALYSIS. $R@$MS is hsericea_seedsplant_2...@haksim.279.edited.tar.gz.capepeninsula.capepeninsula.none-12 Look at the number of cells in r.stats, compared to total cells as given by r.info (which is correct). Any ideas what is happening? I want to calculate the sum of the same map in 500 different mapsets, so I am using this approach. Any input welcome, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9WKTgACgkQoYgNqgF2egp6swCeOstKZfNu31bjam578AZWrXNi +nMAnRP9HD5yhh2/BotB44ZUjPxnCh2n =MQEU -END PGP SIGNATURE- attachment: screen.png screen.png.sig Description: Binary data ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] The algorithm r.cost is runing now and I have a question
Than you so much. I could run the algorithm r.cost on GRASS 6.4.1. without value (0). But now, I am wondering why GRASS use the algorithm (Dijkstra search) for r.cost as ArcGIS. My question... Is (Dijkstra search) the best algorithm to do it?. I appreciate your answer, Elisa From: Markus Metz [markus.metz.gisw...@googlemail.com] Sent: Thursday, February 23, 2012 6:02 PM To: Moritz Lennert Cc: Elisa Solano Villareal; grass-user@lists.osgeo.org Subject: Re: [GRASS-user] The algorithm r.cost is not working On Thu, Feb 23, 2012 at 11:29 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 23/02/12 07:19, Markus Metz wrote: On Wed, Feb 22, 2012 at 11:31 AM, Elisa Solano Villareal villar...@fbk.eu wrote: Thanks for your answer. The cost surface used as input for r.cost must have only positive values, negative values will cause infinite loops. Please make sure your input cost surface has only positive values. but we have seen our data and it doesn't have negative values, the minimun value is 0. I am not sure if a cost of zero is valid or if the algorithm of r.cost (Dijkstra search) does not allow zero costs. If you regard costs as e.g. travelling times, the time needed to traverse a cell, then zero would not be possible, because even if the time needed to traverse a cell is very short, it is always larger than zero. But cost is not necessarily time. Imagine trying to evaluate the cost of expropriation of land for a new road. Some parts of the land might already be in the government hands and they do not have to pay for those, but they would like to establish the cheapest route. So, allowing for 0 cost would be a good thing, if it is not currently allowed. ... Just tried with 6.4.2 (in nc_spm): g.region rast=elevation r.mapcalc mycost=if((row()10 row()100) || (col()10 col()100),0,10) r.cost input=mycost@user1 output=mycumcost coordinate=630515,228182 and it works as expected. So, it doesn't seem to be a problem with 0 values. Thanks for testing! I was not sure of the algorithm used by r.cost supports 0 costs. Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: spgrass6
On Wednesday, February 22, 2012, Paolo Cavallini wrote: Il 22/02/2012 15:54, Roger Bivand ha scritto: Using the improved raster graphics handling for square cells with image() rather than spplot() and useRaster=TRUE - equivalent to image.SpatialGridDataFrame() and useRasterImage=TRUE with the same matrix takes 1.2 seconds on x11/cairo. You didn't say which version of R you are using - the raster graphics facilities have been improved recently. 2.14.1-1 on Debian testing. Did you try using image() instead of spplot() if your cells are square, and if rasterImage() is available in your version of R? Yes, image() is resonably fast, but misses automatic legend, etc. Thanks a lot for your reply. -- Paolo Cavallini See: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user Check out the plot() function from the raster package, or the related rasterViz (?) package. They have some neat stuff in there. Roger already mentioned this, but I'll add a little more. Now that we have powerful computers and nice packages like spgrass6 it is very simple to load large raster files into R without much effort. However, just because we can fit a linear model on that massive stack of pixels doesn't mean that one should. This is even more important with regard to plotting functions. I have found that coarsening the region resolution a bit before loading in raster that only need to be plotted helps considerably. If you really must work with stacks of large grids, the best approach I have found is the raster package. Cheers, Dylan -- Dylan E. Beaudette USDA-NRCS Soil Scientist California Soil Resource Lab http://casoilresource.lawr.ucdavis.edu/ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] grass_addons Integration in GRASS GIS
Hi all I would like to add grass_addons to GRASS, and use it in my code, how can I accomplish it ? Thanks in advance for any suggestion and help. Regards, Ripsime ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: spgrass6
Il 06/03/2012 22:32, Dylan Beaudette ha scritto: Check out the plot() function from the raster package, or the related rasterViz (?) package. They have some neat stuff in there. Roger already mentioned this, but I'll add a little more. Now that we have Thanks for your comments. Please note however that I was talking about a very small (~1Mb) raster, for which the loading time was really surprising. All the best. -- Paolo Cavallini See: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user