Re: [GRASS-user] quick way to create a mask and region after zooming in?
On 03/07/14 01:11, Vishal Mehta wrote: hi all, i want to zoom into a region of interest and have that be the extent of a mask and a named region.(no single map layer quite covers the region of interest) isn't there a a command or flag with g.region or r.mask to do this? if not i'm looking at having to digitize a polygon after zooming in, or manually jotting down the corners of the display window and piping it to g.region. In addition to all the other responses: if you really _do_ want to create a mask, you can use v.in.region to create a polygon of the region and then feed that directly into r.mask (grass7) or transform it to raster and then feed that to r.mask (grass6). Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.hazard.flood
Leo wrote: Cellsize : 118.28096836 SECTION 1a (of 4): Initiating Memory. Current region rows: 17433, cols: 17539 ERROR: G_malloc: unable to allocate 2448854040 bytes of memory at init_vars.c:134 WARNING: Subprocess failed with exit code 1 Madi: This log suggests that r.watershed, called by r.hazard.flood, is not able to finish the job due to lack of memory. [@devs] in bash you can do a test if [ $? -ne 0 ] ; then to see if r.watershed finished correctly and go to a 'g.message -e' and 'exit 1' if it failed. r.hazard.flood is a python script, how to apply the same to grass.run_command() before claiming success and continuing? regards, -- Hamish hamish.webm...@gmail.com . Thought I should join the Yahoo mail diaspora before 30 days worth of my emails got flushed from everyone's spam boxes never to be seen again. In the last weeks some have made it to the ML archives at least, if not to end recipients. Others seem to have just disappeared into /dev/null. It didn't help that the web interface had become an unusable gibberish of broken JavaScript and their IMAP would only transfer the oldest 4% of my inbox. . http://www.ietf.org/mail-archive/web/ietf/current/msg87153.html http://www.spamresource.com/2014/04/up-in-arms-about-yahoos-dmarc-policy.html http://wiki.list.org/pages/viewpage.action?pageId=17891458 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Grouping spatial points
Hi, I've a point vector containing more than 500 points. Some of these points are spatially clumped while others are single independent points (from viewing the map). Now I am wondering if there is any tool in GRASS (or maybe other spatial-statistical software like R) that can be used to group the data so that each point clump is assigned to a group and each single group to its own group. Of course, this needs a criterion where to distinguish between groups/clusters. I'd like to have groups that are separated by a distance of at least 5 km. Is there any recommendation of a simple or more advanced procedure to do that? All suggestions all welcome! Thanks! Best, Johannes ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Error using v.rast.stats: begin transaction
Hi, I'm quite new in using Grass, so maybe this is not a very complicate error. I'm trying to use *v.rast.stats* to calculate statistics on a vector poligon from a raster map, but I always receive this error: v.rast.stats vector=samo_calc_v@samoggia raster=dem80@samoggia colprefix=elev Updating the database ... DBMI-DBF driver error: ERROR: Errore durante l'esecuzione: 'BEGIN TRANSACTION' The new columns were created but they're empty and the table of attributes isn't corrupted. Following the suggestion of a member of the Osgeo Team, I tried to download this nc dataset grass.osgeo.org/sampledata/north_carolina/nc_spm_latest.zip http://grass.osgeo.org/sampledata/north_carolina/nc_spm_latest.zip and I tried to do this, just to remove all doubt: (Tue Jul 08 10:04:05 2014) g.copy vect=zipcodes_wake,myzipcodes_wake Copy vector zipcodes_wake@PERMANENT to current mapset as myzipcodes_wake (Tue Jul 08 10:04:06 2014) Comando terminato (0 sec) (Tue Jul 08 10:04:51 2014) g.region rast=elevation -p projection: 99 (Lambert Conformal Conic) zone: 0 datum: nad83 ellipsoid: a=6378137 es=0.006694380022900787 north: 228500 south: 215000 west: 63 east: 645000 nsres: 10 ewres: 10 rows: 1350 cols: 1500 cells: 2025000 (Tue Jul 08 10:04:51 2014) Comando terminato (0 sec) (Tue Jul 08 10:11:27 2014) v.rast.stats -c myzipcodes_wake raster=elevation colprefix=elev Updating the database ... DBMI-DBF driver error: ERROR: Errore durante l'esecuzione: 'BEGIN TRANSACTION' (Tue Jul 08 10:11:36 2014) Comando terminato (9 sec) The error remain. I'm using Grass 6.4.4 on Windows 7, but if I make the same passages in an other pc (always Windows 7, Grass 6.4.4), it works without problems. Has anybody a suggestion about why does it happen and what to do? All suggestions all welcome! Thanks! Best regards, Francesca -- Francesca Carisi PhD Student Università di Bologna Dip. DICAM - Costruzioni Idrauliche Viale Risorgimento, 2 - 40136 Bologna (ITALY) Tel: +39 051 20 93371 Fax: +39 051 20 93140 E-mail: francesca.car...@unibo.it ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Grouping spatial points
On 08/07/2014 14:58, Johannes Radinger wrote: Hi, I've a point vector containing more than 500 points. Some of these points are spatially clumped while others are single independent points (from viewing the map). Now I am wondering if there is any tool in GRASS (or maybe other spatial-statistical software like R) that can be used to group the data so that each point clump is assigned to a group and each single group to its own group. Of course, this needs a criterion where to distinguish between groups/clusters. I'd like to have groups that are separated by a distance of at least 5 km. Actually this might be quite simple, if you are happy with the rigid 5 km. distance: Just create a buffer around all points of 2.5 km, merge the buffer circles that overlap, then overlay the original points on the merged buffer areas (clusters) to get a "cat" value from each cluster into the points attrib table. There's a nice example of merging buffers in the v.buffer man page. Is there any recommendation of a simple or more advanced procedure to do that? All suggestions all welcome! Thanks! Best, Johannes This mail was received via Mail-SeCure System. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user This mail was received via Mail-SeCure System. -- Micha Silver GIS Consulting 052-3665918 http://www.surfaces.co.il ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error using v.rast.stats: begin transaction
On 08/07/2014 15:35, Francesca Carisi wrote: Hi, I'm quite new in using Grass, so maybe this is not a very complicate error. I'm trying to use v.rast.stats to calculate statistics on a vector poligon from a raster map, but I always receive this error: v.rast.stats vector=samo_calc_v@samoggia raster=dem80@samoggia colprefix=elev Updating the database ... DBMI-DBF driver error: ERROR: Errore durante l'esecuzione: 'BEGIN TRANSACTION' The new columns were created but they're empty and the table of attributes isn't corrupted. Following the suggestion of a member of the Osgeo Team, I tried to download this nc dataset grass.osgeo.org/sampledata/north_carolina/nc_spm_latest.zip and I tried to do this, just to remove all doubt: (Tue Jul 08 10:04:05 2014) g.copy vect=zipcodes_wake,myzipcodes_wake Copy vector zipcodes_wake@PERMANENT to current mapset as myzipcodes_wake (Tue Jul 08 10:04:06 2014) Comando terminato (0 sec) (Tue Jul 08 10:04:51 2014) g.region rast=elevation -p projection: 99 (Lambert Conformal Conic) zone: 0 datum: nad83 ellipsoid: a=6378137 es=0.006694380022900787 north: 228500 south: 215000 west: 63 east: 645000 nsres: 10 ewres: 10 rows: 1350 cols: 1500 cells: 2025000 (Tue Jul 08 10:04:51 2014) Comando terminato (0 sec) (Tue Jul 08 10:11:27 2014) v.rast.stats -c myzipcodes_wake raster=elevation colprefix=elev Updating the database ... DBMI-DBF driver error: ERROR: Errore durante l'esecuzione: 'BEGIN TRANSACTION' (Tue Jul 08 10:11:36 2014) Comando terminato (9 sec) The error remain. I'm using Grass 6.4.4 on Windows 7, but if I make the same passages in an other pc (always Windows 7, Grass 6.4.4), it works without problems. Has anybody a suggestion about why does it happen and what to do? My guess is the DBF driver. Can you try to change your default DB driver to sqlite then try? You will have to: * change the default driver to sqlite with db.connect * copy the original vector (still with the DBF backend) to a new name to create a new vector with an sqlite based attribute table * then try v.rast.stats All suggestions all welcome! Thanks! Best regards, Francesca -- Francesca Carisi PhD Student Universit di Bologna Dip. DICAM - Costruzioni Idrauliche Viale Risorgimento, 2 - 40136 Bologna (ITALY) Tel: +39 051 20 93371 Fax: +39 051 20 93140 E-mail: francesca.car...@unibo.it This mail was received via Mail-SeCure System. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user This mail was received via Mail-SeCure System. -- Micha Silver GIS Consulting 052-3665918 http://www.surfaces.co.il ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Grouping spatial points
Hi, On 08/07/14 13:58, Johannes Radinger wrote: Hi, I've a point vector containing more than 500 points. Some of these points are spatially clumped while others are single independent points (from viewing the map). Now I am wondering if there is any tool in GRASS (or maybe other spatial-statistical software like R) that can be used to group the data so that each point clump is assigned to a group and each single group to its own group. Of course, this needs a criterion where to distinguish between groups/clusters. I'd like to have groups that are separated by a distance of at least 5 km. Is there any recommendation of a simple or more advanced procedure to do that? I think you are talking about hierarchical spatial cluster detection. There is an implementation of this in the free (but not open source) CrimeStat toolbox (.Net Windows only - yuck). Perhaps R has something similar/identical? Best, Ben All suggestions all welcome! Thanks! Best, Johannes ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Dr. Benjamin Ducke, M.A. {*} Geospatial Consultant {*} GIS Developer bendu...@fastmail.fm ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.hazard.flood
On Tue, Jul 8, 2014 at 4:29 AM, Hamish hamish.webm...@gmail.com wrote: Leo wrote: Cellsize : 118.28096836 SECTION 1a (of 4): Initiating Memory. Current region rows: 17433, cols: 17539 ERROR: G_malloc: unable to allocate 2448854040 bytes of memory at init_vars.c:134 WARNING: Subprocess failed with exit code 1 Madi: This log suggests that r.watershed, called by r.hazard.flood, is not able to finish the job due to lack of memory. [@devs] in bash you can do a test if [ $? -ne 0 ] ; then to see if r.watershed finished correctly and go to a 'g.message -e' and 'exit 1' if it failed. r.hazard.flood is a python script, how to apply the same to grass.run_command() before claiming success and continuing? In case of run_command you should check the return value which is the exit code of the module. ret = run_command('g.region', s=0, n=5, w=0, e=5, res=1) if ret != 0: grass.script.fatal(_(g.region failed, see the error message above)) It is actually designed to resemble the calls in shell which I don't think is a right think to do, so please see ticket #2326. [doc] http://grass.osgeo.org/programming7/namespacepython_1_1script_1_1core.html#a0cbf4805e1691904c8245037ea359c71 [src] http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/core.py#L352 [ticket] http://trac.osgeo.org/grass/ticket/2326 regards, -- Hamish hamish.webm...@gmail.com . Thought I should join the Yahoo mail diaspora before 30 days worth of my emails got flushed from everyone's spam boxes never to be seen again. In the last weeks some have made it to the ML archives at least, if not to end recipients. Others seem to have just disappeared into /dev/null. It didn't help that the web interface had become an unusable gibberish of broken JavaScript and their IMAP would only transfer the oldest 4% of my inbox. . http://www.ietf.org/mail-archive/web/ietf/current/msg87153.html http://www.spamresource.com/2014/04/up-in-arms-about-yahoos-dmarc-policy.html http://wiki.list.org/pages/viewpage.action?pageId=17891458 ___ 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] Grouping spatial points
On 08/07/14 13:58, Johannes Radinger wrote: Hi, I've a point vector containing more than 500 points. Some of these points are spatially clumped while others are single independent points (from viewing the map). Now I am wondering if there is any tool in GRASS (or maybe other spatial-statistical software like R) that can be used to group the data so that each point clump is assigned to a group and each single group to its own group. Of course, this needs a criterion where to distinguish between groups/clusters. I'd like to have groups that are separated by a distance of at least 5 km. You could create a distance matrix with v.distance and then group all points which have a distance 5km between each other. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.sun for multiple days
Hello, I'm preparing some maps for use in a MAXENT ecological niche modelling analysis. We're going to use solar radiation as one of the predictors, so will be using the GRASS r.sun command to generate our input rasters. r.sun provides the solar radiation for a single day of the year. My question is, what's the best way to get a summary for the entire year? A simple solution would be to run it for every day, then sum or average the values. That seems likely to be very processor intensive, and I assume the result would be very similar to using every other day, or every third day. Is there a standard procedure for doing this? Thanks for any suggestions! -- Tyler Smith ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.sun for multiple days
On Tue, Jul 8, 2014 at 5:27 PM, Tyler Smith ty...@plantarum.ca wrote: Hello, I'm preparing some maps for use in a MAXENT ecological niche modelling analysis. We're going to use solar radiation as one of the predictors, so will be using the GRASS r.sun command to generate our input rasters. r.sun provides the solar radiation for a single day of the year. My question is, what's the best way to get a summary for the entire year? A simple solution would be to run it for every day, then sum or average the values. That seems likely to be very processor intensive, and I assume the result would be very similar to using every other day, or every third day. Is there a standard procedure for doing this? Hello, I'm the co-author of r.sun.hourly and r.sun.daily modules which wraps r.sun. They are available in GRASS GIS 7 addons repository (and might work in GRASS GIS 6 too). They might be helpful for you. However, this does not answer your question and I myself would be interested in what are the right/bast ways and would be glad to improve the modules if something should be changed or improved. http://grass.osgeo.org/grass70/manuals/addons/r.sun.daily.html https://svn.osgeo.org/grass/grass-addons/grass7/raster/r.sun.daily/ The basic idea of r.sun.daily was taken from examples from GRASS book: http://www.grassbook.org/examples_menu.php http://www.grassbook.org/examples_menu2nd.php Vaclav Thanks for any suggestions! -- Tyler Smith ___ 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