Re: [GRASS-dev] v.rast.stats parallel process

2018-06-14 Thread Moritz Lennert
>> On Behalf Of Moritz Lennert Sent: torsdag 14. juni 2018 13:05 To: Lorenzo Bottaccioli mailto:lorenzo.bottacci...@gmail.com>>; GRASS developers list mailto:grass-dev@lists.osgeo.org>> Subject: Re: [GRASS-dev] v.rast.stats parallel process On 14/06/18 12

Re: [GRASS-dev] v.rast.stats parallel process

2018-06-14 Thread Lorenzo Bottaccioli
Moritz > Lennert > Sent: torsdag 14. juni 2018 13:05 > To: Lorenzo Bottaccioli ; GRASS developers > list > Subject: Re: [GRASS-dev] v.rast.stats parallel process > > On 14/06/18 12:24, Lorenzo Bottaccioli wrote: > > Hi all, > > > > There is any chance th

Re: [GRASS-dev] v.rast.stats parallel process

2018-06-14 Thread Stefan Blumentrath
Bottaccioli ; GRASS developers list Subject: Re: [GRASS-dev] v.rast.stats parallel process On 14/06/18 12:24, Lorenzo Bottaccioli wrote: > Hi all, > > There is any chance that the v.rast.stats will be paralellized? You mean to treat several rasters at the same time ? It shouldn

Re: [GRASS-dev] v.rast.stats parallel process

2018-06-14 Thread Moritz Lennert
On 14/06/18 12:24, Lorenzo Bottaccioli wrote: Hi all, There is any chance that the v.rast.stats will be paralellized? You mean to treat several rasters at the same time ? It shouldn't be too complicated to write a wrapper script for this. I would imagine the biggest problem to be the handlin

[GRASS-dev] v.rast.stats parallel process

2018-06-14 Thread Lorenzo Bottaccioli
Hi all, There is any chance that the v.rast.stats will be paralellized? Best, lorenzo ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] v.rast.stats with multiple input

2018-01-08 Thread Stefan Blumentrath
Dear GRASS-devs, I would like to extract statistics for vector geometries from a couple of maps derived from the same terrain model. Unfortunately, v.rast.stats has two limitations for my use-case: 1) the rasterization has a significant overhead when called several times 2) only one p

Re: [GRASS-dev] v.rast.stats does not recognize layer="cat"

2016-10-26 Thread Helmut Kudrnovsky
>v.rast.stats map=$imf raster=$imf.4 layer="cat" column_prefix=n >method=average [...] >layer=string >Layer number or name is "cat" your layer name? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/v-rast-stats-does-not-recognize-layer-cat-tp5292

Re: [GRASS-dev] v.rast.stats does not recognize layer="cat"

2016-10-26 Thread Martin Landa
Hi, please report this issue in trac. It's a bug. Ma 2016-10-26 19:53 GMT+02:00 Yann : > Hi, > > v.rast.stats map=$imf raster=$imf.4 layer="cat" column_prefix=n > method=average > > File "/usr/local/grass-7.3.svn/scripts/v.rast.stats", line 292, in > main() > File "/usr/local/grass-7.3.svn

[GRASS-dev] v.rast.stats does not recognize layer="cat"

2016-10-26 Thread Yann
Hi, v.rast.stats map=$imf raster=$imf.4 layer="cat" column_prefix=n method=average File "/usr/local/grass-7.3.svn/scripts/v.rast.stats", line 292, in main() File "/usr/local/grass-7.3.svn/scripts/v.rast.stats", line 147, in main fi = grass.vector_db(map=vector)[int(layer)] ValueE

Re: [GRASS-dev] v.rast.stats disables MASK

2015-12-31 Thread Anna Petrášová
On Thu, Dec 31, 2015 at 10:45 AM, Martin Landa wrote: > 2015-12-31 16:17 GMT+01:00 Anna Petrášová : > > I removed it but I don't plan to backport it for 7.0.3 > > probably we could plan for 7.0.4? Ma > already there: https://trac.osgeo.org/grass/wiki/Grass7Planning > > -- > Martin Landa > http

Re: [GRASS-dev] v.rast.stats disables MASK

2015-12-31 Thread Martin Landa
2015-12-31 16:17 GMT+01:00 Anna Petrášová : > I removed it but I don't plan to backport it for 7.0.3 probably we could plan for 7.0.4? Ma -- Martin Landa http://geo.fsv.cvut.cz/gwiki/Landa http://gismentors.cz/mentors/landa ___ grass-dev mailing list g

Re: [GRASS-dev] v.rast.stats disables MASK

2015-12-31 Thread Anna Petrášová
On Tue, Dec 29, 2015 at 12:20 PM, Martin Landa wrote: > Hi, > > 2015-12-29 15:03 GMT+01:00 Anna Petrášová : > > I think r66421 should be backported and as for the mask, the related > code > > done in r67421. > > > can be removed in my opinion. > > no objection. Ma > I removed it but I don't pla

Re: [GRASS-dev] v.rast.stats disables MASK

2015-12-29 Thread Martin Landa
Hi, 2015-12-29 15:03 GMT+01:00 Anna Petrášová : > I think r66421 should be backported and as for the mask, the related code done in r67421. > can be removed in my opinion. no objection. Ma -- Martin Landa http://geo.fsv.cvut.cz/gwiki/Landa http://gismentors.cz/mentors/landa _

Re: [GRASS-dev] v.rast.stats disables MASK

2015-12-29 Thread Anna Petrášová
I think r66421 should be backported and as for the mask, the related code can be removed in my opinion. Anna On Tue, Dec 29, 2015 at 4:40 AM, Markus Neteler wrote: > On Wed, Oct 7, 2015 at 3:27 PM, Anna Petrášová > wrote: > > Hi, > > > > sorry I jumped so late into this discussion, but I thin

Re: [GRASS-dev] v.rast.stats disables MASK

2015-12-29 Thread Markus Neteler
On Wed, Oct 7, 2015 at 3:27 PM, Anna Petrášová wrote: > Hi, > > sorry I jumped so late into this discussion, but I think we can just remove > any mask related code in v.rast.stats - it's apparently leftover from > https://trac.osgeo.org/grass/changeset/4/ > > It used mask in the past, but now

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-20 Thread Anna Petrášová
On Fri, Nov 20, 2015 at 4:17 AM, Nikos Alexandris wrote: > * Anna Petrášová [2015-11-20 00:10:19 -0500]: > > > On Thu, Nov 19, 2015 at 2:53 PM, Nikos Alexandris < > n...@nikosalexandris.net> > > wrote: > > > > > Nikos: > > > > > > > > The command > > > > > v.rast.stats map=SomeVector raster=Some

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-20 Thread Nikos Alexandris
* Anna Petrášová [2015-11-20 00:10:19 -0500]: > On Thu, Nov 19, 2015 at 2:53 PM, Nikos Alexandris > wrote: > > > Nikos: > > > > > > The command > > > > v.rast.stats map=SomeVector raster=SomeRaster column='t' > > > > fails. Perhaps the line > > > > Anna: > > > > > How exactly does it fail? > >

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-19 Thread Anna Petrášová
On Thu, Nov 19, 2015 at 2:53 PM, Nikos Alexandris wrote: > Nikos: > > > > The command > > > v.rast.stats map=SomeVector raster=SomeRaster column='t' > > > fails. Perhaps the line > > Anna: > > > How exactly does it fail? > > --%<--- > v.info -c Test > INTEGER|cat > INTEGER|Id > CHARACTER|Name > >

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-19 Thread Nikos Alexandris
Nikos: > >> > The command > >> > v.rast.stats map=SomeVector raster=SomeRaster column='t' > >> > fails. Perhaps the line Anna: > >> How exactly does it fail? Nikos: > > --%<--- > > v.info -c Test > > INTEGER|cat > > INTEGER|Id > > CHARACTER|Name > > > > v.rast.stats map=Test raster=LT519602820

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-19 Thread Markus Neteler
On Thu, Nov 19, 2015 at 8:53 PM, Nikos Alexandris wrote: > Nikos: > >> > The command >> > v.rast.stats map=SomeVector raster=SomeRaster column='t' >> > fails. Perhaps the line > > Anna: > >> How exactly does it fail? > > --%<--- > v.info -c Test > INTEGER|cat > INTEGER|Id > CHARACTER|Name > > v.ra

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-19 Thread Nikos Alexandris
Nikos: > > The command > > v.rast.stats map=SomeVector raster=SomeRaster column='t' > > fails. Perhaps the line Anna: > How exactly does it fail? --%<--- v.info -c Test INTEGER|cat INTEGER|Id CHARACTER|Name v.rast.stats map=Test raster=LT51960282005221KIS00_B1 column='t' Traceback (most recent

Re: [GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-19 Thread Anna Petrášová
On Thu, Nov 19, 2015 at 1:28 PM, Nikos Alexandris wrote: > The command > > v.rast.stats map=SomeVector raster=SomeRaster column='t' > > fails. Perhaps the line > How exactly does it fail? > > < > https://trac.osgeo.org/grass/browser/grass/trunk/scripts/v.rast.stats/v.rast.stats.py#L265 > > > >

[GRASS-dev] v.rast.stats fails with column_prefix='t'

2015-11-19 Thread Nikos Alexandris
The command v.rast.stats map=SomeVector raster=SomeRaster column='t' fails. Perhaps the line was simply meant to be something like: for colname in colnames: variable = colprefix + '_' + colname

Re: [GRASS-dev] v.rast.stats: ERROR: Input window changed while maps are open for read.

2015-10-26 Thread Sören Gebbert
Hi, i messed up r.univar implementing a new flag. I will fix it in trunk and implement some tests for v.rast.stats and a zone test for r.univar. Best regards Soeren 2015-10-24 20:28 GMT+02:00 Helmut Kudrnovsky : > Helmut Kudrnovsky wrote >> hi, >> >> by testing the manual example of v.rast.stats,

Re: [GRASS-dev] v.rast.stats: ERROR: Input window changed while maps are open for read.

2015-10-24 Thread Helmut Kudrnovsky
Helmut Kudrnovsky wrote > hi, > > by testing the manual example of v.rast.stats, I get following error: > > v.rast.stats --verbose map=myzipcodes_wake@gbiftest > raster=elevation@PERMANENT column_prefix=elev > method=minimum,maximum,average,stddev,percentile > Adding columns '['elev_minimum DOUBL

[GRASS-dev] v.rast.stats: ERROR: Input window changed while maps are open for read.

2015-10-24 Thread Helmut Kudrnovsky
hi, by testing the manual example of v.rast.stats, I get following error: v.rast.stats --verbose map=myzipcodes_wake@gbiftest raster=elevation@PERMANENT column_prefix=elev method=minimum,maximum,average,stddev,percentile Adding columns '['elev_minimum DOUBLE PRECISION', 'elev_maximum DOUBLE PRECI

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-07 Thread Anna Petrášová
Hi, sorry I jumped so late into this discussion, but I think we can just remove any mask related code in v.rast.stats - it's apparently leftover from https://trac.osgeo.org/grass/changeset/4/ It used mask in the past, but now it uses r.univar zones instead. Anna On Wed, Oct 7, 2015 at 8:47

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-07 Thread Newcomb, Doug
+1 Agree. I've run into this before Doug On Wed, Oct 7, 2015 at 1:05 AM, Maris Nartiss wrote: > This definitely needs a flag + explanation in documentation. > > Taking into account philosophy behind GRASS raster processing, I would > say - default should be to apply MASK, as MASK affects all r

Re: [GRASS-dev] v.rast.stats: NULL values for very small areas

2015-10-07 Thread Blumentrath, Stefan
: 7. oktober 2015 10:23 To: Moritz Lennert Cc: Martin Landa ; GRASS developers list Subject: Re: [GRASS-dev] v.rast.stats: NULL values for very small areas 2015-10-06 19:26 GMT+03:00 Moritz Lennert : >> I just wonder how to implement within Python script. > > > Get areas of a

Re: [GRASS-dev] v.rast.stats: NULL values for very small areas

2015-10-07 Thread Maris Nartiss
2015-10-06 19:26 GMT+03:00 Moritz Lennert : >> I just wonder how to implement within Python script. > > > Get areas of all polygons (or lenghts of lines) with v.to.db and then divide > the features into those with areas above pixel size and those with areas > below. Treat each set differently (i.e.

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-07 Thread Martin Landa
Hi, 2015-10-07 7:05 GMT+02:00 Maris Nartiss : > This definitely needs a flag + explanation in documentation. > > Taking into account philosophy behind GRASS raster processing, I would > say - default should be to apply MASK, as MASK affects all raster > reading operations (unless stated otherwise

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Maris Nartiss
This definitely needs a flag + explanation in documentation. Taking into account philosophy behind GRASS raster processing, I would say - default should be to apply MASK, as MASK affects all raster reading operations (unless stated otherwise or requested by user). Maris. 2015-10-06 19:15 GMT+03

Re: [GRASS-dev] v.rast.stats: NULL values for very small areas

2015-10-06 Thread Moritz Lennert
On 06/10/15 17:51, Martin Landa wrote: Hi, 2015-10-06 17:29 GMT+02:00 Moritz Lennert : One can argue that setting them NULL is actually a valid choice as it might not be legitimate to give them values of pixel so much larger. But maybe this should be decided by a flag ? right, a flag could be

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Martin Landa
2015-10-06 18:13 GMT+02:00 Moritz Lennert : > But this was a bug that you fixed in r66421, or ? yes, it was. I was just wondering why the module should ignore the mask. It was answered. Martin -- Martin Landa http://geo.fsv.cvut.cz/gwiki/Landa http://gismentors.cz/mentors/landa _

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Moritz Lennert
On 06/10/15 17:46, Martin Landa wrote: 2015-10-06 17:32 GMT+02:00 Moritz Lennert : Just intrigued by this: I though the mask is mapset based, so how you can you have an active mask in a mapset that is not defined within that mapset ? yes, mask is mapset based. The problem is that `v.rast.stats

Re: [GRASS-dev] v.rast.stats: NULL values for very small areas

2015-10-06 Thread Martin Landa
Hi, 2015-10-06 17:29 GMT+02:00 Moritz Lennert : > One can argue that setting them NULL is actually a valid choice as it might > not be legitimate to give them values of pixel so much larger. But maybe > this should be decided by a flag ? right, a flag could be an option. [...] > Get area and if

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Martin Landa
2015-10-06 17:32 GMT+02:00 Moritz Lennert : > Just intrigued by this: I though the mask is mapset based, so how you can > you have an active mask in a mapset that is not defined within that mapset ? yes, mask is mapset based. The problem is that `v.rast.stats` checks first MASK raster map in the s

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Moritz Lennert
On 06/10/15 16:11, Martin Landa wrote: Hi all, v.rast.stats tries to disable MASK before doing statistics, what is a reason for that? I would guess that in most cases, users want the info of v.rast.stats for all of their vector map and taking into account the mask might lead to counter-intui

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Moritz Lennert
On 06/10/15 16:11, Martin Landa wrote: Hi all, v.rast.stats tries to disable MASK before doing statistics, what is a reason for that? BTW, in r66421 I fixed issue when MASK is not located in the current mapset (and cannot be disabled). Just intrigued by this: I though the mask is mapset based,

Re: [GRASS-dev] v.rast.stats: NULL values for very small areas

2015-10-06 Thread Moritz Lennert
On 06/10/15 16:57, Martin Landa wrote: Hi all, `v.rast.stats` uploads NULL values for areas which are smaller that computation region resolution (ie. fits completely into one cell), see [1] --- region grid in black, red lines for area of given category. In this case v.rast.stats uploads NULL val

[GRASS-dev] v.rast.stats: NULL values for very small areas

2015-10-06 Thread Martin Landa
Hi all, `v.rast.stats` uploads NULL values for areas which are smaller that computation region resolution (ie. fits completely into one cell), see [1] --- region grid in black, red lines for area of given category. In this case v.rast.stats uploads NULL values. I wonder how to change this behaviou

Re: [GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Markus Neteler
On Tue, Oct 6, 2015 at 4:11 PM, Martin Landa wrote: > Hi all, > > v.rast.stats tries to disable MASK before doing statistics, what is a > reason for that? Apparently I was the original author :-) but I don't remember any reason. Maybe it was a workaround a different problem back in Aug 2005?

[GRASS-dev] v.rast.stats disables MASK

2015-10-06 Thread Martin Landa
Hi all, v.rast.stats tries to disable MASK before doing statistics, what is a reason for that? BTW, in r66421 I fixed issue when MASK is not located in the current mapset (and cannot be disabled). Martin -- Martin Landa http://geo.fsv.cvut.cz/gwiki/Landa http://gismentors.cz/mentors/landa _

[GRASS-dev] v.rast.stats by other column instead of 'cat'

2014-11-07 Thread Javier Martínez-López
Dear all, is it possible to use v.rast.stats or a similar function to compute univariate statistics from a raster map for each category present in a column of a vector map? As far as I know v.rast.stats only allow to do it by 'cat'. Thank you very much and cheers, Javier

[GRASS-dev] v.rast.stats broken - all versions

2012-04-02 Thread Michael Barton
v.rast.stats is broken in GRASS 6.4.2 and 6.4.3. Here is an example of what is happening. GRASS 6.4.2 (Spain_utm_wgs84z30):~ > v.rast.stats -c vector=alcala_subsect_g6@SAA2012_survey_analysis raster=srtm_p199r033_clean@dem colprefix=elev WARNING: Area without centroid (may be OK for island) WAR

Re: [GRASS-dev] v.rast.stats

2010-09-20 Thread Dylan Beaudette
On Monday 20 September 2010, Markus Metz wrote: > Dylan Beaudette wrote: > > Hi, > > > > There are times were dumping the results from v.rast.stats to a file is > > more efficient than uploading to an attribute table. Would anyone be > > interested in a slight modification to v.rast.stats that woul

Re: [GRASS-dev] v.rast.stats

2010-09-20 Thread Markus Metz
Dylan Beaudette wrote: > Hi, > > There are times were dumping the results from v.rast.stats to a file is more > efficient than uploading to an attribute table. Would anyone be interested in > a slight modification to v.rast.stats that would allow this? This functionality already exists in r.univar

Re: [GRASS-dev] v.rast.stats

2010-09-17 Thread Hamish
> Therefore, would it make sense to replace the sh version in > GRASS65 with a modified version of the python script from GRASS7? as far as converting shell scripts in 6.5 to python scripts for 6.5, I would say no, don't bother; if a shell version already exists just stick with that; msys support

Re: [GRASS-dev] v.rast.stats

2010-09-17 Thread Hamish
Dylan wrote: > There are times were dumping the results from v.rast.stats > to a file is more efficient than uploading to an attribute > table. Would anyone be interested in a slight modification to > v.rast.stats that would allow this? Also, would it be worth > putting in the time to implement thi

[GRASS-dev] v.rast.stats

2010-09-17 Thread Dylan Beaudette
Hi, There are times were dumping the results from v.rast.stats to a file is more efficient than uploading to an attribute table. Would anyone be interested in a slight modification to v.rast.stats that would allow this? Also, would it be worth putting in the time to implement this in sh, when p

Re: [GRASS-dev] v.rast.stats Python error

2009-07-10 Thread Markus Metz
Markus Neteler wrote: > On Fri, Jul 10, 2009 at 3:50 PM, Martin Landa wrote: > >> 2009/7/10 Markus Neteler : >> >>> Traceback (most recent call last): >>> File >>> "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.rast.stats", >>> line 275, in >>>main() >>> File >>> "/

Re: [GRASS-dev] v.rast.stats Python error

2009-07-10 Thread Markus Neteler
On Fri, Jul 10, 2009 at 3:50 PM, Martin Landa wrote: > 2009/7/10 Markus Neteler : >> Traceback (most recent call last): >>  File >> "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.rast.stats", >> line 275, in >>    main() >>  File >> "/home/neteler/grass70/dist.x86_64-unknown-linu

Re: [GRASS-dev] v.rast.stats Python error

2009-07-10 Thread Martin Landa
Hi, 2009/7/10 Markus Neteler : [...] > Traceback (most recent call last): >  File > "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.rast.stats", > line 275, in >    main() >  File > "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.rast.stats", > line 164, in main

[GRASS-dev] v.rast.stats Python error

2009-07-10 Thread Markus Neteler
Hi, running v.rast.stats in GRASS 7 leads to a Python error: GRASS 7.0.svn (spearfish60):~ > g.copy vect=fields,myfields --o Copy vector to current mapset as WARNING: Vector map already exists and will be overwritten GRASS 7.0.svn (spearfish60):~ > v.rast.stats myfields raster=elevation.dem

Re: [GRASS-dev] v.rast.stats wxPython GUI input reading error

2009-02-03 Thread Glynn Clements
Hamish wrote: > > "r.info -s" outputs DMS, when it should probably > > use decimal (-g uses decimal for n/s/e/w). > > g.region and libgis accept res=DD:MM:SS, so why should it use decimal? So that everything which uses it doesn't have to explicitly convert it to decimal. > Usually for lat/lon

Re: [GRASS-dev] v.rast.stats wxPython GUI input reading error

2009-02-02 Thread Hamish
Glynn wrote: > "r.info -s" outputs DMS, when it should probably > use decimal (-g uses decimal for n/s/e/w). g.region and libgis accept res=DD:MM:SS, so why should it use decimal? Usually for lat/lon resolutions (e.g. 2 minutes or 30 seconds) it is much better & more precisely+understandably repre

Re: [GRASS-dev] v.rast.stats wxPython GUI input reading error

2009-02-02 Thread Glynn Clements
Yann Chemin wrote: > the following error happens with actual SVN. (Debian Lenny system) > File "/home/yann/tmp/grass/dist.i686-pc-linux-gnu/etc/python/grass.py", > line 568, in raster_info > kv[k] = float(kv[k]) > ValueError: invalid literal for float(): 0:00:07.81346 "r.info -s" outputs

[GRASS-dev] v.rast.stats wxPython GUI input reading error

2009-02-02 Thread Yann Chemin
Hello, the following error happens with actual SVN. (Debian Lenny system) -- v.rast.stats vector=irrigat...@permanent raster=neth_f...@permanentcolprefix=freq Traceback (most recent call last): File "/usr/local/grass-7.0.svn/scripts/v.rast.stats", line 275, in m

Re: [GRASS-dev] v.rast.stats

2008-07-29 Thread Moritz Lennert
On 28/07/08 19:50, chris carleton wrote: Hello All - I have a question about the v.rast.stats script. I want to maintain a MASK for the process in order to isolate portions of the raster and attaching those stats to the vector table. In the script, any user defined mask is temporarily renamed,

[GRASS-dev] v.rast.stats

2008-07-28 Thread chris carleton
Hello All - I have a question about the v.rast.stats script. I want to maintain a MASK for the process in order to isolate portions of the raster and attaching those stats to the vector table. In the script, any user defined mask is temporarily renamed, but I don't see a place in the script whe