Re: [GRASS-user] Possible bug in r.sum and in r.stats?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/03/12 00:16, Glynn Clements wrote: > > Rainer M Krug wrote: > >> As some commands do use the region and mask, while others don't, it might be >> a good idea to >> make this clear in the manual - I know, it is stated if they do, but not if >> they don't. > > I would expect it to be the other way around. I might remember reading in the manual of a module that it uses the region and MASK - but in general it might be the other way round. > Most raster modules respect the current region and mask, because it happens > automatically. So the default behaviour is: all r. modules respect the region and MASK, with some exceptions. > Modules which don't want to use the current region have to explicitly set the > working region > (typically based upon an input map); modules which don't want inputs to be > masked have to > explicitly disable masking. Makes sense. > > As a general guideline, you should expect any module which actually processes > raster data to > honour the current region and mask (r.info isn't such a module; it just > display's the map's > metadata). Based on what you say, I think it might be a good idea to a) state this on the manual page about the raster modules, and b) separate the list of raster modules into the ones which - respect region and MASK - respect region only - respect MASK only (I don't thik there are any) - use the region of the map and don't use MASK I think this would clarify things a lot. Cheers, 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/ iEYEARECAAYFAk9ZwFoACgkQoYgNqgF2egr4jACfad9tQFKGhHeUKDwrhWLhzaAQ raAAn1yv3Uu2PzgD+hjDRWAIZgSskPm2 =VNgR -END PGP SIGNATURE- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Possible bug in r.sum and in r.stats?
Rainer M Krug wrote: > As some commands do use the region and mask, while others don't, it might be > a good idea to make > this clear in the manual - I know, it is stated if they do, but not if they > don't. I would expect it to be the other way around. Most raster modules respect the current region and mask, because it happens automatically. Modules which don't want to use the current region have to explicitly set the working region (typically based upon an input map); modules which don't want inputs to be masked have to explicitly disable masking. As a general guideline, you should expect any module which actually processes raster data to honour the current region and mask (r.info isn't such a module; it just display's the map's metadata). -- Glynn Clements ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Possible bug in r.sum and in r.stats?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/12 21:20, Glynn Clements wrote: > > Rainer M Krug wrote: > >> I get the following output as seen on the screenshot. > > In future, please copy/paste the text rather than using a screenshot. I wanted to, but it was completely garbled due to line breaks: I now changed the wraplength setting (thunderbird - http://forums.mozillazine.org/viewtopic.php?f=29&t=1598995), and it would have looked fine. > >> 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? > > Does the current region match the raster? r.info displays statistics for the > underlying raster; > the data which r.stats uses is resampled and cropped/padded according to the > current region. Thanks a lot - that is the problem - the wind file was different. Fixed it and it is working now. As some commands do use the region and mask, while others don't, it might be a good idea to make this clear in the manual - I know, it is stated if they do, but not if they don't. An sub-section under the Description might be an option? Cheers, 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/ iEYEARECAAYFAk9Yf0wACgkQoYgNqgF2egq6mgCfb6AzJXqW9nSVnDOc9JdH31dR D+gAn37fhHZp/Jkfn/TJEZvy0CqTKmoI =dbyd -END PGP SIGNATURE- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Possible bug in r.sum and in r.stats?
Rainer M Krug wrote: > I get the following output as seen on the screenshot. In future, please copy/paste the text rather than using a screenshot. > 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? Does the current region match the raster? r.info displays statistics for the underlying raster; the data which r.stats uses is resampled and cropped/padded according to the current region. -- Glynn Clements ___ 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- <> screen.png.sig Description: Binary data ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user