Re: [GRASS-user] Calculate raster statistics for each polygon
Hi Thanks Martin but It's not working. With the following command v.rast.stats -c -e --verbose vector=s...@permanent raster=se...@permanentcolprefix=stat I'm getting this error: Adding columns ' stat_n INTEGER, stat_min DOUBLE PRECISION, stat_max DOUBLE PRECISION, stat_range DOUBLE PRECISION, stat_mean DOUBLE PRECISION, stat_stdde DOUBLE PRECISION, stat_varia DOUBLE PRECISION, stat_cf_va DOUBLE PRECISION, stat_sum DOUBLE PRECISION, stat_first DOUBLE PRECISION, stat_media DOUBLE PRECISION, stat_third DOUBLE PRECISION, stat_per90 DOUBLE PRECISION' C:/GRASS6/scripts/v.rast.stats: line 268: v.db.addcol: command not found ERROR: Cannot continue (problem adding columns). Why am I getting this? Or, what I have to do before I run v.rast.stat? Thanks Kat 2010/8/5 Martin Wegmann martin.wegm...@uni-wuerzburg.de Hello, I think v.rast.stats is what you are looking for http://grass.itc.it/gdp/html_grass64/v.rast.stats.html regards, Martin On Donnerstag, 5. August 2010 18:25:37 katrin eggert wrote: Hello I have polygon layer which divides my image into several areas all contiguous. With the same size, I have a raster image. I want to: - calculate the most frequent value of the raster inside each polygon; - the maximum and minimum value inside each polygon How can this be done in GRASS? Thanks Katrin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Calculate raster statistics for each polygon
Hello, which GRASS version are you using and on which plattform? I did it with GRASS 6.4.0RC6 on Linux using the example GRASS dataset and it worked without problems: v.rast.stats -e vector=geol...@permanent layer=1 raster=elevat...@permanent colprefix=new_ percentile=90 and the new attribute table when querying the vector file looks like this: cat : 270 onemap_pro : 333074592 PERIMETER : 191354.515625 GEOL250_ : 271 GEOL250_ID : 270 GEO_NAME : CZig SHAPE_area : 333074608.99 SHAPE_len : 191354.519722 new__n : 24 new__min : 106.708168 new__max : 108.974335 new__range : 2.266167 new__mean : 107.466569 new__stdde : 0.653831 new__varia : 0.427495 new__cf_va : 0.608404 new__sum : 2579.197662 new__first : 106.772 new__media : 107.506 new__third : 107.803 new__per90 : 108.416 regards, Martin On Freitag, 6. August 2010 10:22:10 katrin eggert wrote: Hi Thanks Martin but It's not working. With the following command v.rast.stats -c -e --verbose vector=s...@permanent raster=se...@permanentcolprefix=stat I'm getting this error: Adding columns ' stat_n INTEGER, stat_min DOUBLE PRECISION, stat_max DOUBLE PRECISION, stat_range DOUBLE PRECISION, stat_mean DOUBLE PRECISION, stat_stdde DOUBLE PRECISION, stat_varia DOUBLE PRECISION, stat_cf_va DOUBLE PRECISION, stat_sum DOUBLE PRECISION, stat_first DOUBLE PRECISION, stat_media DOUBLE PRECISION, stat_third DOUBLE PRECISION, stat_per90 DOUBLE PRECISION' C:/GRASS6/scripts/v.rast.stats: line 268: v.db.addcol: command not found ERROR: Cannot continue (problem adding columns). Why am I getting this? Or, what I have to do before I run v.rast.stat? Thanks Kat 2010/8/5 Martin Wegmann martin.wegm...@uni-wuerzburg.de Hello, I think v.rast.stats is what you are looking for http://grass.itc.it/gdp/html_grass64/v.rast.stats.html regards, Martin On Donnerstag, 5. August 2010 18:25:37 katrin eggert wrote: Hello I have polygon layer which divides my image into several areas all contiguous. With the same size, I have a raster image. I want to: - calculate the most frequent value of the raster inside each polygon; - the maximum and minimum value inside each polygon How can this be done in GRASS? Thanks Katrin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Calculate raster statistics for each polygon
It might be something to do with v.db.addcol in windows: http://osgeo-org.1803224.n2.nabble.com/GRASS-GIS-1110-v-rast-stats-locks-up-on-wingrass-td5311955.html cheers Sab Hello, which GRASS version are you using and on which plattform? I did it with GRASS 6.4.0RC6 on Linux using the example GRASS dataset and it worked without problems: v.rast.stats -e vector=geol...@permanent layer=1 raster=elevat...@permanent colprefix=new_ percentile=90 and the new attribute table when querying the vector file looks like this: cat : 270 onemap_pro : 333074592 PERIMETER : 191354.515625 GEOL250_ : 271 GEOL250_ID : 270 GEO_NAME : CZig SHAPE_area : 333074608.99 SHAPE_len : 191354.519722 new__n : 24 new__min : 106.708168 new__max : 108.974335 new__range : 2.266167 new__mean : 107.466569 new__stdde : 0.653831 new__varia : 0.427495 new__cf_va : 0.608404 new__sum : 2579.197662 new__first : 106.772 new__media : 107.506 new__third : 107.803 new__per90 : 108.416 regards, Martin On Freitag, 6. August 2010 10:22:10 katrin eggert wrote: Hi Thanks Martin but It's not working. With the following command v.rast.stats -c -e --verbose vector=s...@permanent raster=se...@permanentcolprefix=stat I'm getting this error: Adding columns ' stat_n INTEGER, stat_min DOUBLE PRECISION, stat_max DOUBLE PRECISION, stat_range DOUBLE PRECISION, stat_mean DOUBLE PRECISION, stat_stdde DOUBLE PRECISION, stat_varia DOUBLE PRECISION, stat_cf_va DOUBLE PRECISION, stat_sum DOUBLE PRECISION, stat_first DOUBLE PRECISION, stat_media DOUBLE PRECISION, stat_third DOUBLE PRECISION, stat_per90 DOUBLE PRECISION' C:/GRASS6/scripts/v.rast.stats: line 268: v.db.addcol: command not found ERROR: Cannot continue (problem adding columns). Why am I getting this? Or, what I have to do before I run v.rast.stat? Thanks Kat 2010/8/5 Martin Wegmann martin.wegm...@uni-wuerzburg.de Hello, I think v.rast.stats is what you are looking for http://grass.itc.it/gdp/html_grass64/v.rast.stats.html regards, Martin On Donnerstag, 5. August 2010 18:25:37 katrin eggert wrote: Hello I have polygon layer which divides my image into several areas all contiguous. With the same size, I have a raster image. I want to: - calculate the most frequent value of the raster inside each polygon; - the maximum and minimum value inside each polygon How can this be done in GRASS? Thanks Katrin ___ 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] Calculate raster statistics for each polygon
I'm running GRASS6.4RC6 in Windows with a 2-week old Binary (we are only using Windows here). With that exact command I got: C:/GRASS6/scripts/v.rast.stats: line 268: v.db.addcol: command not found ERROR: Cannot continue (problem adding columns). Is this a common/expected problem in Windows? if yes, how can I perform this analysis without using v.rast.stats? Thanks Kat 2010/8/6 Martin Wegmann martin.wegm...@uni-wuerzburg.de Hello, which GRASS version are you using and on which plattform? I did it with GRASS 6.4.0RC6 on Linux using the example GRASS dataset and it worked without problems: v.rast.stats -e vector=geol...@permanent layer=1 raster=elevat...@permanent colprefix=new_ percentile=90 and the new attribute table when querying the vector file looks like this: cat : 270 onemap_pro : 333074592 PERIMETER : 191354.515625 GEOL250_ : 271 GEOL250_ID : 270 GEO_NAME : CZig SHAPE_area : 333074608.99 SHAPE_len : 191354.519722 new__n : 24 new__min : 106.708168 new__max : 108.974335 new__range : 2.266167 new__mean : 107.466569 new__stdde : 0.653831 new__varia : 0.427495 new__cf_va : 0.608404 new__sum : 2579.197662 new__first : 106.772 new__media : 107.506 new__third : 107.803 new__per90 : 108.416 regards, Martin On Freitag, 6. August 2010 10:22:10 katrin eggert wrote: Hi Thanks Martin but It's not working. With the following command v.rast.stats -c -e --verbose vector=s...@permanent raster=se...@permanentcolprefix=stat I'm getting this error: Adding columns ' stat_n INTEGER, stat_min DOUBLE PRECISION, stat_max DOUBLE PRECISION, stat_range DOUBLE PRECISION, stat_mean DOUBLE PRECISION, stat_stdde DOUBLE PRECISION, stat_varia DOUBLE PRECISION, stat_cf_va DOUBLE PRECISION, stat_sum DOUBLE PRECISION, stat_first DOUBLE PRECISION, stat_media DOUBLE PRECISION, stat_third DOUBLE PRECISION, stat_per90 DOUBLE PRECISION' C:/GRASS6/scripts/v.rast.stats: line 268: v.db.addcol: command not found ERROR: Cannot continue (problem adding columns). Why am I getting this? Or, what I have to do before I run v.rast.stat? Thanks Kat 2010/8/5 Martin Wegmann martin.wegm...@uni-wuerzburg.de Hello, I think v.rast.stats is what you are looking for http://grass.itc.it/gdp/html_grass64/v.rast.stats.html regards, Martin On Donnerstag, 5. August 2010 18:25:37 katrin eggert wrote: Hello I have polygon layer which divides my image into several areas all contiguous. With the same size, I have a raster image. I want to: - calculate the most frequent value of the raster inside each polygon; - the maximum and minimum value inside each polygon How can this be done in GRASS? Thanks Katrin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Problems with a GeoTIFF referenced in Gauss Boaga system
Thank you to all, I solved the problem by avoiding the location option. On 08/05/2010 04:14 PM, Giacomo Piva wrote: Hi all, I'm fighting with r.in.gdal function and a GeoTiff gereferenced in the Gauss Boaga system. I have this GeoTiff that is originlly georeferenced in the WGS84 system and I need to convert it into Gauss Boaga system using the gdalwarp GDAL command tool. Moreover I need to convert this raster in a shapefile using the r.to.vect GRASS command. This is the (correct) gdalinfo output of mu Gauss Boaga GeoTiff: Coordinate System is: PROJCS[Monte Mario / Italy zone 1, GEOGCS[Monte Mario, DATUM[Monte_Mario, SPHEROID[International 1924,6378388,297.0005, AUTHORITY[EPSG,7022]], AUTHORITY[EPSG,6265]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4265]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,0], PARAMETER[central_meridian,9], PARAMETER[scale_factor,0.9996], PARAMETER[false_easting,150], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,3003]] When I run the command r.in.gdal -o -e input=inputfile.tif output=inputraster location=location I get this error about the region ERROR: region for current mapset is not set run g.region The g.region -p command return: projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 How should I do? The same image georeferenced in the WGS84 system is properly loaded, so I'm wondering about to convert the GeoTiff AFTER loading int GRASS, but I don't know how. Does someone can help me? Thank you -- Giacomo Piva MEEO S.r.l. Via Saragat 9 I-44122 Ferrara, Italy Tel: +39 0532 1861501 Fax: +39 0532 1861637 http://www.meeo.it ATTENZIONE:le informazioni contenute in questo messaggio sono da considerarsi confidenziali ed il loro utilizzo è riservato unicamente al destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore è tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni supporto elettronico o cartaceo. WARNING:This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Calculate raster statistics for each polygon
Hi Katrin, Is this a common/expected problem in Windows? if yes, how can I perform this analysis without using v.rast.stats? Thanks Kat please try the latest nightly-build of wingrass64 (http://josef.fsv.cvut.cz/wingrass/grass64/). this issue should be fixed there. best regards Helmut ___ GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT! Jetzt freischalten unter http://movieflat.web.de smime.p7s Description: S/MIME Cryptographic Signature ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Using r.univar.zonal- calculate most frequent value
Hi there, I have tested r.univar.zonal (pretty useful!!) but now I have one question: - Is it possible to calculate the most frequent value inside a zone? (I don't think so If not, is there any other way to calculate this in GRASS? Thanks Antonio __ Information from ESET NOD32 Antivirus, version of virus signature database 5345 (20100805) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.watershed from Metz et al. Paper in 6.4
Is the r.watershed in 6.4 the one described in the Metz et al. 2010 paper? Should I stay with 6.4 or switch to 7. I am about to extract streams, watersheds, and other things with grass and r.stream*. Any advice would be greatly appreciated. -- Stephen Sefick | Auburn University | | Department of Biological Sciences | | 331 Funchess Hall | | Auburn, Alabama | | 36849 | |___| | sas0...@auburn.edu | | http://www.auburn.edu/~sas0025 | |___| Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] attributes in networks
hello all, I have a problem with the command v.net.path v.net and how you can add attributes to the network or as the network can be created with the attributes of the points and segments. thanks for your answers I worked with Grass Gis 6.5svn Ricardo Rodríguez Univalle ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] 1-page grass overview
On Wednesday 04 August 2010, Hamish wrote: Hi, for the upcoming FOSS4G conference[1] we have put together a live dvd[2] with GRASS and a whole bunch of other OSGeo software, about 40 FOSS geo projects are participating in all. It would be great if folks could read through the 1-page overview doc[3] for GRASS (made with reStructured Text and Sphinx if you wondered), and the 5 minute quickstart tutorial[4]. A full list of project docs on the disc is interesting to look through as well.[5] Also if anyone is really keen they can download an ISO of the DVD[6] and test that it actually works. I've already discovered that the new QGIS 1.5 grass plugin doesn't like the user not owning the PERMANENT mapset, even if it's not the one being used. Test results to the OSGeo wiki[7] and bugs to the osgeo bug trac'er[8] please (including doc bugs; set component as LiveDVD). it goes to the printers next week. [1] http://2010.foss4g.org [2] http://live.osgeo.org [3] http://download.osgeo.org/livedvd/4.0-rc6/osgeolive-docs/overview/grass_ove rview.html [4] http://download.osgeo.org/livedvd/4.0-rc6/osgeolive-docs/quickstart/grass_q uickstart.html [5] http://download.osgeo.org/livedvd/4.0-rc6/osgeolive-docs/overview/overview. html [6] http://download.osgeo.org/livedvd/4.0-rc6/ [7] http://wiki.osgeo.org/wiki/Live_GIS_Disc_Testing [8] https://trac.osgeo.org/osgeo/report/10 thanks, Hamish Just wanted to mention that the product looks very polished and the short summary of GRASS is well done. Great work! Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] 1-page grass overview
Hamish wrote: [...] [4] http://download.osgeo.org/livedvd/4.0-rc6/osgeolive-docs/quickstart/grass_ quickstart.html I would only add something about the powerful i.smap in the quickstart page. Cheers, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Feed and manipulate the result of v.distance -pa in python
On Wednesday 04 of August 2010 15:20:58 schorschli wrote: For your task the use of lists and the split tool may help. The different lines have are seperated by a '\n' (which is interpreted as a new line). After splitting the string into a line list you can make a loop each item of this list. Something like this: output='7839|16\n7839|17\n7839|22\n7839|23\n7839|24' seccond_column_list=[] max_value=0 line_list=output.split('\n') for line in line_list: columns=line.split('|') seccond_column_list.append(float(columns[1])) max_value=max(seccond_column_list) print seccond_column_list print max_value I may missunderstood your question but I hope this helps. Thanks Hamish and Matthias. Here one (more) solution: # get distances from v.distance -pa distances = grass.read_command(v.distance,\ flags = 'pa',\ _from = reference_points_map,\ to = lowres_vector_grid,\ column = gridcell_column,\ to_column = cat,\ upload = to_attr) # get max distance max_distance=max([float(d.split('|')[1]) for d in distances.splitlines() [1:]]) (Thanks to Aggelos Nikolaou for the solution. It's something trivial but when _not_ working all-the-time with python looks difficult in the beginning.) Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Feed and manipulate the result of v.distance -pa in python
Hi, 2010/8/6 Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de: distances = grass.read_command(v.distance,\ flags = 'pa',\ _from = reference_points_map,\ to = lowres_vector_grid,\ column = gridcell_column,\ to_column = cat,\ upload = to_attr) btw, there is no need for '\' at the of the line. Martin -- Martin Landa landa.martin gmail.com * http://gama.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Feed and manipulate the result of v.distance -pa in python
Nikos Alexandris: distances = grass.read_command(v.distance,\ flags = 'pa',\ _from = reference_points_map,\ to = lowres_vector_grid,\ column = gridcell_column,\ to_column = cat,\ upload = to_attr) Martin Landa wrote: btw, there is no need for '\' at the of the line. Thanks, Martin. Good to know. That's my bash-habit ;-) Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Clipping shapefile
On Friday 06 of August 2010 10:57:25 Giacomo Piva wrote: Hi all, I have a new question. I need to clip a shapefile using a bounding box, can I do that with grass? Giacomo, have a look at: http://grass.osgeo.org/grass64/manuals/html64_user/v.overlay.html Cheers, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] module v.in.e00
I have a problem with this import command. Whenever I try to import an E00 file it shows that I have not installed. I checked it again by running the OSGEO4W installation patch and there I crossed checked that avce00 library is also installed, but this problem simply does not go away and it keeps recurring as folows. v.in.e00 file=C:/Documents and Settings/ishan/My Documents/Downloads/25192/hypoint.e00 type=point vect=hypoint which: e00conv: unknown command 'e00conv' program not found, install it first http://avce00.maptools.org Finished with error Help is needed! Ambrish Dhaka ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] module v.in.e00
Hi, 2010/8/6 ambrish dhaka ambi...@hotmail.com: which: e00conv: unknown command 'e00conv' program not found, install it first http://avce00.maptools.org it seems to me that the message is quite informative - download install e00conv from http://avce00.maptools.org/. Martin -- Martin Landa landa.martin gmail.com * http://gama.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] KML and v.in.ogr
Hi, In importing a KML file using v.in.ogr, the table doesn't parse breaks correctly. The result is a column in which the delimiters (B and /B, BR and /BR) appear as text. Is this fixable, or should I try and parse the database table myself? This is in 6.4 on OSX. Richard Chirgwin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] GRASS Meetup Group LA Area
http://www.meetup.com/Los-Angeles-Area-GRASS-Users-Group === Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of Statistics; Director: UCLA Center for Environmental Statistics (CES); Editor: Journal of Multivariate Analysis, Journal of Statistical Software; US mail: 8125 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554 phone (310)-825-9550; fax (310)-206-5658; email: dele...@stat.ucla.edu .mac: jdeleeuw ++ aim: deleeuwjan ++ skype: j_deleeuw homepages: http://gifi.stat.ucla.edu ++ http://www.cuddyvalley.org - No matter where you go, there you are. --- Buckaroo Banzai http://gifi.stat.ucla.edu/sounds/nomatter.au - ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user