Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Thanx Micha Silver :) Worked now after setting region S and W and also change resolution to what the raster had. :) 2015-04-29 18:44 GMT+02:00 Micha Silver : > > > On 04/29/2015 03:15 PM, Johan Nilsson wrote: > > Have now tried to run v.rast.stats in Grass 7.0. It start and run 100% > off one core in hours, until a file in ~/grassdata/location/PERMANENT/.tmp/ > inflate to the disk is full, approximate 150GB :( > > Whoa! > Check the region settings before you try again: > g.region -p > This is FAQ #0 for all work with GRASS. The v.rast.stats module works by > first rasterizing the vector polygons into a temporary raster. If you > region is very large, and resolution setting is very small, you might be > getting a huge temporary raster. > > > Have made topology check on the vector-data and imported it to grassdb. > Will see if I can collect usefull data and ask on grass-user list. > > Stupid Ubuntu 14.04 to not messure invisible files in the normal > file-manager, had gone faster to pinpoint the problem. > > /Cheers > > 2015-04-19 18:54 GMT+02:00 Micha Silver : > >> >> >> On 04/19/2015 12:34 PM, Johan Nilsson wrote: >> >> Zonal statistics work well to extract, numers of cells(counts) , sum of >> the value (sum) and also average (mean) But I want the minimum AND >> max-value and also standard error, if possible. Is there another plugin or >> a tutorial how it may bee done in another way. >> >>The GRASS module v.rast.stats does what you want. But it's not in the >> Processing toolbox. You can import your raster into a GRASS mapset then do >> the analysis directly within GRASS. >> >> The code to Zonal statistics are here, but I'm total lost in how it >> work. >> >> >> https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp >> >> /Cheers >> >> This mail was received via Mail-SeCure System. >> >> >> ___ >> Qgis-user mailing >> listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user >> This mail was received via Mail-SeCure System. >> >> >> >> >> > > This mail was received via Mail-SeCure System. > > > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Ok. Thanks. Seems like g.region is from equator and greenwich, south 0 and west 0. 2015-04-29 18:44 GMT+02:00 Micha Silver : > > > On 04/29/2015 03:15 PM, Johan Nilsson wrote: > > Have now tried to run v.rast.stats in Grass 7.0. It start and run 100% > off one core in hours, until a file in ~/grassdata/location/PERMANENT/.tmp/ > inflate to the disk is full, approximate 150GB :( > > Whoa! > Check the region settings before you try again: > g.region -p > This is FAQ #0 for all work with GRASS. The v.rast.stats module works by > first rasterizing the vector polygons into a temporary raster. If you > region is very large, and resolution setting is very small, you might be > getting a huge temporary raster. > > > Have made topology check on the vector-data and imported it to grassdb. > Will see if I can collect usefull data and ask on grass-user list. > > Stupid Ubuntu 14.04 to not messure invisible files in the normal > file-manager, had gone faster to pinpoint the problem. > > /Cheers > > 2015-04-19 18:54 GMT+02:00 Micha Silver : > >> >> >> On 04/19/2015 12:34 PM, Johan Nilsson wrote: >> >> Zonal statistics work well to extract, numers of cells(counts) , sum of >> the value (sum) and also average (mean) But I want the minimum AND >> max-value and also standard error, if possible. Is there another plugin or >> a tutorial how it may bee done in another way. >> >>The GRASS module v.rast.stats does what you want. But it's not in the >> Processing toolbox. You can import your raster into a GRASS mapset then do >> the analysis directly within GRASS. >> >> The code to Zonal statistics are here, but I'm total lost in how it >> work. >> >> >> https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp >> >> /Cheers >> >> This mail was received via Mail-SeCure System. >> >> >> ___ >> Qgis-user mailing >> listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user >> This mail was received via Mail-SeCure System. >> >> >> >> >> > > This mail was received via Mail-SeCure System. > > > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
On 04/29/2015 03:15 PM, Johan Nilsson wrote: Have now tried to run v.rast.stats in Grass 7.0. It start and run 100% off one core in hours, until a file in ~/grassdata/location/PERMANENT/.tmp/ inflate to the disk is full, approximate 150GB :( Whoa! Check the region settings before you try again: g.region -p This is FAQ #0 for all work with GRASS. The v.rast.stats module works by first rasterizing the vector polygons into a temporary raster. If you region is very large, and resolution setting is very small, you might be getting a huge temporary raster. Have made topology check on the vector-data and imported it to grassdb. Will see if I can collect usefull data and ask on grass-user list. Stupid Ubuntu 14.04 to not messure invisible files in the normal file-manager, had gone faster to pinpoint the problem. /Cheers 2015-04-19 18:54 GMT+02:00 Micha Silver: On 04/19/2015 12:34 PM, Johan Nilsson wrote: Zonal statistics work well to extract, numers of cells(counts) , sum of the value (sum) and also average (mean) But I want the minimum AND max-value and also standard error, if possible. Is there another plugin or a tutorial how it may bee done in another way. The GRASS module v.rast.stats does what you want. But it's not in the Processing toolbox. You can import your raster into a GRASS mapset then do the analysis directly within GRASS. The code to Zonal statistics are here, but I'm total lost in how it work. https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp /Cheers This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user This mail was received via Mail-SeCure System. This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Have now tried to run v.rast.stats in Grass 7.0. It start and run 100% off one core in hours, until a file in ~/grassdata/location/PERMANENT/.tmp/ inflate to the disk is full, approximate 150GB :( Have made topology check on the vector-data and imported it to grassdb. Will see if I can collect usefull data and ask on grass-user list. Stupid Ubuntu 14.04 to not messure invisible files in the normal file-manager, had gone faster to pinpoint the problem. /Cheers 2015-04-19 18:54 GMT+02:00 Micha Silver : > > > On 04/19/2015 12:34 PM, Johan Nilsson wrote: > > Zonal statistics work well to extract, numers of cells(counts) , sum of > the value (sum) and also average (mean) But I want the minimum AND > max-value and also standard error, if possible. Is there another plugin or > a tutorial how it may bee done in another way. > > The GRASS module v.rast.stats does what you want. But it's not in the > Processing toolbox. You can import your raster into a GRASS mapset then do > the analysis directly within GRASS. > > The code to Zonal statistics are here, but I'm total lost in how it work. > > > https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp > > /Cheers > > This mail was received via Mail-SeCure System. > > > ___ > Qgis-user mailing > listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user > This mail was received via Mail-SeCure System. > > > > > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Hi Johan, On Sat, 25. Apr 2015 at 16:16:54 +0200, Johan Nilsson wrote: > 2015-04-22 18:12 GMT+02:00 Jürgen E. : > > On Wed, 22. Apr 2015 at 14:25:32 +0200, Johan Nilsson wrote: > > > Asked for advice to install nightly build on > > > http://lists.osgeo.org/mailman/options/ubuntu, because can't find > > > anything on google, to install nighly build, only on precise (12.04) not > > > on trusty (14.04) > > See http://qgis.org/de/site/forusers/alldownloads.html#debian-ubuntu > > So you probably want to add > > deb http://qgis.org/debian-nightly trusty main > Jurgen E. Are you sure? I have ubuntugis-unstable installed and are afraid > there going to depenency problems if i install debian-nightly? Didn't you ask for a nightly build for trusty (w/o mentioning ubuntugis)? If you want a nightly build with ubuntugis dependencies you need http://qgis.org/ubuntugis-nightly instead of http://qgis.org/debian-nightly. Also described on the page above. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: Digital signature ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Jurgen E. Are you sure? I have ubuntugis-unstable installed and are afraid there going to depenency problems if i install debian-nightly? 2015-04-22 18:12 GMT+02:00 Jürgen E. : > Hi Johan, > > On Wed, 22. Apr 2015 at 14:25:32 +0200, Johan Nilsson wrote: > > Hi. Nyall. > > Asked for advice to install nightly build on > > http://lists.osgeo.org/mailman/options/ubuntu, because can't find > anything > > on google, to install nighly build, only on precise (12.04) not on trusty > > (14.04) > > See http://qgis.org/de/site/forusers/alldownloads.html#debian-ubuntu > > So you probably want to add > > deb http://qgis.org/debian-nightly trusty main > > to your /etc/apt/sources.list and do > > apt-get update && apt-get install qgis > > as root to install qgis. > > > Jürgen > > -- > Jürgen E. Fischer norBIT GmbH Tel. > +49-4931-918175-31 > Dipl.-Inf. (FH) Rheinstraße 13 Fax. > +49-4931-918175-50 > Software Engineer D-26506 Norden > http://www.norbit.de > QGIS release manager (PSC) GermanyIRC: jef on FreeNode > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Hi Johan, On Wed, 22. Apr 2015 at 14:25:32 +0200, Johan Nilsson wrote: > Hi. Nyall. > Asked for advice to install nightly build on > http://lists.osgeo.org/mailman/options/ubuntu, because can't find anything > on google, to install nighly build, only on precise (12.04) not on trusty > (14.04) See http://qgis.org/de/site/forusers/alldownloads.html#debian-ubuntu So you probably want to add deb http://qgis.org/debian-nightly trusty main to your /etc/apt/sources.list and do apt-get update && apt-get install qgis as root to install qgis. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: Digital signature ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Hi. Nyall. Asked for advice to install nightly build on http://lists.osgeo.org/mailman/options/ubuntu, because can't find anything on google, to install nighly build, only on precise (12.04) not on trusty (14.04) 2015-04-21 0:38 GMT+02:00 Nyall Dawson : > On 19 April 2015 at 19:34, Johan Nilsson wrote: > > Zonal statistics work well to extract, numers of cells(counts) , sum of > the > > value (sum) and also average (mean) But I want the minimum AND max-value > > and also standard error, if possible. Is there another plugin or a > tutorial > > how it may bee done in another way. > > > > Try updating to a nightly development version of QGIS. A bunch of > extra stats were just added yesterday to zonal stats, including min, > max, median, stdev, etc. [1] > > Nyall > > [1] > https://github.com/qgis/QGIS/commit/ee7b4d2539337f937aec9efae9ad603f8e2014ff > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
On 19 April 2015 at 19:34, Johan Nilsson wrote: > Zonal statistics work well to extract, numers of cells(counts) , sum of the > value (sum) and also average (mean) But I want the minimum AND max-value > and also standard error, if possible. Is there another plugin or a tutorial > how it may bee done in another way. > Try updating to a nightly development version of QGIS. A bunch of extra stats were just added yesterday to zonal stats, including min, max, median, stdev, etc. [1] Nyall [1] https://github.com/qgis/QGIS/commit/ee7b4d2539337f937aec9efae9ad603f8e2014ff ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Hi Johan. I've re-added the QGIS-User list to this, as I'm primarily on Windows. Just upgraded to QGIS 2.8.1 no a virtual machine with ubuntu 14.04, and also didn't get SAGA or GRASS installed immediately, and don't have time right now to figure it out. (I imagine others on the list can help you with the saga/grass install issues) As a quick work-around, you should be able to just install SAGA via the tarball here: http://sourceforge.net/projects/saga-gis/files/SAGA%20-%202.1/SAGA%202.1.4/ [or just sudo apt-get install saga seems to work too]. At least on windows, you can just drag files into SAGA and work with them there, and then work with the respective modules, so hopefully that is the same on Ubuntu. An alternative is working with R, using the 'extract' function in the 'raster' package (see the documentation here: http://cran.r-project.org/web/packages/raster/index.html; and a good intro to spatial data with R is available here: http://science.nature.nps.gov/im/datamgmt/statistics/r/advanced/spatial.cfm) Sorry I can't be more help - good luck. Cheers, Mike On Mon, Apr 20, 2015 at 9:12 AM, Johan Nilsson wrote: > Can't find Saga or Grass tools on Ubuntu 14.04 with > http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu > > Maybe down grade to stable? For a couple of years ago unstable was stable, > but now with Grass 7.0 and i don't know how it is with SAGA, but I can not > find it. Maybe It is why Processing --> Zonal Statistics do not work > because it depend on Grass 6.4 or Saga? When i run processing --> zonal > statistics noting happens but say I shoukld check the log, but the > log-window does not show anything. > > 2015-04-20 2:23 GMT+02:00 Michael Treglia : > >> Also, theres a utility in SAGA, implemented within the Processing >> toolbox. See SAGA -> Shapes - Grid -> Grid statistics for polygons >> >> Lets you calculate: >> * Number of Cells >> * Minimum >> * Maximum >> * Range >> * Sum >> * Mean >> * Variance >> * Standard Deviation >> * Specified Quartiles >> >> Hope that helps, >> mike >> >> On Sun, Apr 19, 2015 at 11:54 AM, Micha Silver wrote: >> >>> >>> >>> On 04/19/2015 12:34 PM, Johan Nilsson wrote: >>> >>> Zonal statistics work well to extract, numers of cells(counts) , sum >>> of the value (sum) and also average (mean) But I want the minimum AND >>> max-value and also standard error, if possible. Is there another plugin or >>> a tutorial how it may bee done in another way. >>> >>> The GRASS module v.rast.stats does what you want. But it's not in the >>> Processing toolbox. You can import your raster into a GRASS mapset then do >>> the analysis directly within GRASS. >>> >>> The code to Zonal statistics are here, but I'm total lost in how it >>> work. >>> >>> >>> https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp >>> >>> /Cheers >>> >>> This mail was received via Mail-SeCure System. >>> >>> >>> ___ >>> Qgis-user mailing >>> listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user >>> This mail was received via Mail-SeCure System. >>> >>> >>> >>> >>> >>> ___ >>> Qgis-user mailing list >>> Qgis-user@lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/qgis-user >>> >> >> > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Also, theres a utility in SAGA, implemented within the Processing toolbox. See SAGA -> Shapes - Grid -> Grid statistics for polygons Lets you calculate: * Number of Cells * Minimum * Maximum * Range * Sum * Mean * Variance * Standard Deviation * Specified Quartiles Hope that helps, mike On Sun, Apr 19, 2015 at 11:54 AM, Micha Silver wrote: > > > On 04/19/2015 12:34 PM, Johan Nilsson wrote: > > Zonal statistics work well to extract, numers of cells(counts) , sum of > the value (sum) and also average (mean) But I want the minimum AND > max-value and also standard error, if possible. Is there another plugin or > a tutorial how it may bee done in another way. > > The GRASS module v.rast.stats does what you want. But it's not in the > Processing toolbox. You can import your raster into a GRASS mapset then do > the analysis directly within GRASS. > > The code to Zonal statistics are here, but I'm total lost in how it work. > > > https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp > > /Cheers > > This mail was received via Mail-SeCure System. > > > ___ > Qgis-user mailing > listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user > This mail was received via Mail-SeCure System. > > > > > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
On 04/19/2015 12:34 PM, Johan Nilsson wrote: Zonal statistics work well to extract, numers of cells(counts) , sum of the value (sum) and also average (mean) But I want the minimum AND max-value and also standard error, if possible. Is there another plugin or a tutorial how it may bee done in another way. The GRASS module v.rast.stats does what you want. But it's not in the Processing toolbox. You can import your raster into a GRASS mapset then do the analysis directly within GRASS. The code to Zonal statistics are here, but I'm total lost in how it work. https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp /Cheers This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Hi Johan, try Zonal Statistics from Processing 2015-04-19 12:34 GMT+03:00 Johan Nilsson : > Zonal statistics work well to extract, numers of cells(counts) , sum of the > value (sum) and also average (mean) But I want the minimum AND max-value > and also standard error, if possible. Is there another plugin or a tutorial > how it may bee done in another way. > > The code to Zonal statistics are here, but I'm total lost in how it work. > > https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp > > /Cheers > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user -- Alexander Bruy ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Extract raster cell-value statistics (min, max, count, sum) within a polygone
Zonal statistics work well to extract, numers of cells(counts) , sum of the value (sum) and also average (mean) But I want the minimum AND max-value and also standard error, if possible. Is there another plugin or a tutorial how it may bee done in another way. The code to Zonal statistics are here, but I'm total lost in how it work. https://github.com/qgis/QGIS/blob/a2f51260db5357917e86b78f1bb2915379d670dd/src/analysis/vector/qgszonalstatistics.cpp /Cheers ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user