[GRASS-user] sunmask
Hi all. I'm trying r.sunmask, but I get errors: === r.sunmask elev=t_dtm...@permanent year=2010 month=05 day=05 hour=10 minute=07 timezone=+1 -z output=shadow Using map center coordinates: 1663547.265000 4801864.162000 Neither sun position nor east/north, date/time/timezone definition are complete. === Is the QGIS module incomplete, or? All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.generalize crash
On Tue, May 4, 2010 at 6:52 PM, Paolo Cavallini cavall...@faunalia.it wrote: Nikos Alexandris ha scritto: Does it crash immediately or after a long time? It works for me in a small file (boundaries though, not lines) and takes forever (still running after 15min in a big file containing contours) but no crash. It is a memory error: when filled up it crashes. Obviously this does not happen with simpler layers. From the manual: Snakes Algorithm is (asymptotically) the slowest among the algorithms presented above. Also, it requires quite a lot of memory. This means that it is not very efficient for maps with the lines consisting of many segments. Try another smoothing algorithm, e.g. chaiken. HTH, Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.generalize crash
Markus Metz ha scritto: Try another smoothing algorithm, e.g. chaiken. Thanks. Yes, Chaiken and Hermite work. However, IMHO it should not crash, just stop. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.generalize crash
On Wed, May 5, 2010 at 10:49 AM, Paolo Cavallini cavall...@faunalia.it wrote: Markus Metz ha scritto: Try another smoothing algorithm, e.g. chaiken. Thanks. Yes, Chaiken and Hermite work. However, IMHO it should not crash, just stop. Right. I'll fix it, it should abort with fatal error: Out of memory. Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.generalize crash
Markus Metz ha scritto: Right. I'll fix it, it should abort with fatal error: Out of memory. Thanks a lot for this. -- Paolo Cavallini: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] rainfall data
You are going to have to be more specific. Are you trying to interpolate a rainfall map from several pluviometric stations or do you have precipitation maps from some other source and want to open them in Grass? To interpolate the rainfall check out the v.surf.* modules Daniel On Wed, May 5, 2010 at 8:36 AM, Sandile Gumede akasand...@gmail.com wrote: which command do I use to model rainfall data in GRASS6? -- Kind Regards TS Gumede Candidate Researcher Meraka Institute, CSIR office : 012 841 2606 mobile : 072 258 1650 ___ 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] rainfall data
You then need to import the data in Grass. After you created the correct location and mapset you can use r.in.gdal to import the data. If your .tiff image has projection information you can use it to create the location Cheers Daniel On Wed, May 5, 2010 at 9:10 AM, Sandile Gumede akasand...@gmail.com wrote: Hi I've got TRMM rainfall data (in .tiff format), I want to do analysis on the data and estimate how much rainfall has fallen to the surface, check if there is possibility for flooding to occur. Which commands to pass to perform this? On Wed, May 5, 2010 at 1:49 PM, Daniel Victoria daniel.victo...@gmail.com wrote: You are going to have to be more specific. Are you trying to interpolate a rainfall map from several pluviometric stations or do you have precipitation maps from some other source and want to open them in Grass? To interpolate the rainfall check out the v.surf.* modules Daniel On Wed, May 5, 2010 at 8:36 AM, Sandile Gumede akasand...@gmail.com wrote: which command do I use to model rainfall data in GRASS6? -- Kind Regards TS Gumede Candidate Researcher Meraka Institute, CSIR office : 012 841 2606 mobile : 072 258 1650 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Kind Regards TS Gumede Candidate Researcher Meraka Institute, CSIR office : 012 841 2606 mobile : 072 258 1650 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Call an external function from GRASS-Pythons Scripts
Hi, 2010/5/5 Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de: [...] I just read about this past debate. So, it is always better to use the Reply to Mailing-List button (KMail here)? Pohhh... I am really sorry if I caused any problem since I've always been using the Reply-to-All for the list and the Reply-to for personal messages. AFAIU, Reply-to-All is OK. 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] Problem with running Python script in GRASS
We really need a cookbook way to set up GRASS for Windows so that Python scripts run. A couple students and I have struggled with this for the past 9 months. Although we've managed to get Python recognized by WinGRASS by running in a Windows terminal rather than Msys, we still can't run scripts that call GRASS libraries or the parser. Michael Begin forwarded message: Date: Tue, 4 May 2010 22:17:16 -0700 (PDT) From: LeeDaniel lee.daniel.1...@gmail.com Subject: [GRASS-user] Problem with running Python script in GRASS To: grass-user@lists.osgeo.org Message-ID: 1273036636062-5007296.p...@n2.nabble.com Content-Type: text/plain; charset=us-ascii Hello fellow GRASS users! I'm sure this is a very simple problem but I'm having a really difficult time with it... After searching for the solution for several days I'm on the end of my whits and am really needing this script to get working. This is the problem: I've written a Python script, doing my best to use the Python I know and reverse engineer the python scripts I found in the Internet. As far as I can tell, the script should be fine, although I naturally can't execute it independently. My goal is to run it as a command from inside GRASS so that the user can input the parameters through the GUI. I think GRASS recognizes that the script is there but isn't able to generate the GUI. Here's the script: __ # # MODULE: r.solar # AUTHOR(S):Daniel Lee # PURPOSE: Runs r.sun for a year using different inputs for each month # COPYRIGHT:(C) 2010 by Daniel Lee # # This program is free software under the GNU General Public # License (=v2). Read the file COPYING that comes with GRASS # for details. # # #%Module #% label: Solar modeling tool. #% description: Conducts a solar analysis for a year using empirical inputs for each month. #% keywords: raster #%End #%Option #% key: elevin #% type: string #% gisprompt: old,cell,raster #% description: Name of input elevation map (unit = meters) #% required : yes #% guisection: Required inputs #%End #%Option #% key: aspect #% type: string #% gisprompt: old,cell,raster #% description: Name of input aspect map (decimal degrees) #% required : yes #% guisection: Required inputs #%End #%Option #% key: slopein #% type: string #% gisprompt: old,cell,raster #% description: Name of input slope map (decimal degrees) #% required : yes #% guisection: Required inputs #%End #%Option #% key: linkein #% type: string #% gisprompt: old,cell,raster #% description: Name of input Linke atmospheric turbidity coefficient map #% required : no #% guisection: Optional inputs #%End #%Option #% key: albedo #% type: string #% gisprompt: old,cell,raster #% description: Name of input albedo coefficient map #% required : no #% guisection: Optional inputs #%End #%Option #% key: mapset #% type: string #% description: Name of the mapset containing solar data #% required : yes #% guisection: Required inputs #%End #%Flag #% key: z #% description: Generate map of sunlight insolation time (h) #% guisection: Output options #%End #%Flag #% key: y #% description: Generate map of reflected radiation (Wh/m2) #% guisection: Output options #%End import sys import os import string import grass.script as grass def main(): elevin = options['elevin'] aspect = options['aspect'] slopein = options['slopein'] linkein = options['linkein'] albedo = options['albedo'] mapset = @ + options['mapset'] reflected = flags['y'] duration = flags['z'] step = 0.16 for day in range(365): day += 1 # Define month if day == 1: month = 01 + mapset elif day == 32: month = 02 + mapset elif day == 60: month = 03 + mapset elif day == 91: month = 04 + mapset elif day == 121: month = 05 + mapset elif day == 152: month = 06 + mapset elif day == 182: month = 07 + mapset elif day == 213: month = 08 + mapset elif day == 244: month = 09 + mapset elif day == 274: month = 10 + mapset elif day == 305: month = 11 + mapset elif day == 335: month = 12 + mapset # Define coefficients! coefbh = 'coefbh' + month coefdh = 'coefdh' + month if not grass.find_file(elevin)['file'] or not grass.find_file(aspect)['file'] or not grass.find_file(slopein)['file'] or not grass.find_file(coefbh)['file'] or not grass.find_file(coefdh)['file']: grass.fatal(_(Raster map %a not found.) % input # Define outputs! beam_rad = 'beam' + str(day) diff_rad = 'diffuse' + str(day) glob_rad = 'global' + str(day) if duration and reflected: insol_time = 'insol_time' + str(day) refl_rad
Re: [GRASS-user] rainfall data
On Wed, May 5, 2010 at 1:36 PM, Sandile Gumede akasand...@gmail.com wrote: which command do I use to model rainfall data in GRASS6? There are several option. See here for GRASS related publications: http://www.citeulike.org/user/neteler/article/4509581 http://www.citeulike.org/user/neteler/article/4078343 Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] sunmask
Hi Paolo, On Wed, May 5, 2010 at 10:13 AM, Paolo Cavallini cavall...@faunalia.it wrote: Hi all. I'm trying r.sunmask, but I get errors: === r.sunmask elev=t_dtm...@permanent year=2010 month=05 day=05 hour=10 minute=07 timezone=+1 -z output=shadow Using map center coordinates: 1663547.265000 4801864.162000 Neither sun position nor east/north, date/time/timezone definition are complete. === Is the QGIS module incomplete, or? Yes: the second parameter is missing. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Problem with running Python script in GRASS
Hello, Thanks for the answer. Yeah, that's really strange. Now I've installed Linux on top of Windows and tried running it there. I seem to get a step further. Rather than spitting out that strange error message I get the following: child process exited abnormally And another window pops up, titled dialog0. Nothing more to report other than that... But now that I'm in Linux it should work better, right? Does anybody have a fix or an idea of what it could be? Thanks so much! The desperate Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-with-running-Python-script-in-GRASS-tp5007296p5011558.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RE: [GRASS-user] Question with Python-SWIG example [SEC=UNCLASSIFIED]
From: Glynn Clements Andrew MacIntyre wrote: In the case where SWIG is using its own objects to contain returned pointers, then I expect pyobj_to_ptr() needs to be changed to use SWIG_ConvertPtr() rather than PyCObject_AsVoidPtr() to retrieve the actual pointer, or the output typemaps for returned pointers need to be changed to use Python's CObjects rather than native SWIG wrapper objects. So, what do you suggest? Remove the PyCObject_Check() call, explicitly check for string, read buffer, write buffer, and sequence, then call SWIG_ConvertPtr() on anything which is left over? That's what I would try. Cheers, Andrew. - These thoughts are mine alone! - Andrew MacIntyre Operations Branch tel: +61 2 6219 5356 Communications Infrastructure Division fax: +61 2 6253 3277 Australian Communications Media Authority email: andrew.macint...@acma.gov.auhttp://www.acma.gov.au/ If you have received this email in error, please notify the sender immediately and erase all copies of the email and any attachments to it. The information contained in this email and any attachments may be private, confidential and legally privileged or the subject of copyright. If you are not the addressee it may be illegal to review, disclose, use, forward, or distribute this email and/or its contents. Unless otherwise specified, the information in the email and any attachments is intended as a guide only and should not be relied upon as legal or technical advice or regarded as a substitute for legal or technical advice in individual cases. Opinions contained in this email or any of its attachments do not necessarily reflect the opinions of ACMA. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user