Re: [GRASS-user] Import question
On 10/01/2010 01:35 AM, Adam Dershowitz, Ph.D., P.E. wrote: I have a series of points in an ascii files that represent points along a line. I would like to import them as a line, or import and convert to a line. I see that 6.5 has v.in.lines, but I am using 6.4. Is there any other way to do that conversion? The data is 3D x,y,z points. I can just import them using v.in.ascii, but then they are points, with no lines. Is there another way to either import, directly, or convert? If it's only one line, then the simplest might be to re-write the ASCII file formated in the GRASS standard format, as a line. You'll need to add the header lines, something like: VERTI: L n 1 X_coord Y_coord ... ... 1 1 Where 'n' is the number of points. Then run v.in.ascii ... format=standard and it should result in a line vector. Thanks, --Adam ___ 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 Arava Development Co. +972-52-3665918 http://surfaces.co.il ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Application of r.color
Hi there I have a script where I create a map (using mapcalc) and I want to attribute a color (gray for instance) but it ranges from 0 to 5 so I cannot attribute gray0-1 neither gray0-255. What can I do to attribute a color table that stretches its color attibution to the image max and minimum values? Thanks Luis ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] A Py-script where I check group and delete
Greetings I have a Python-script where I create a group (using i.group) but, if the group already exists I need to eliminate (g.remove). My question is: How can I check, using Python Script code, if a group already exists? Thanks Luisa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Import question
On Oct 1, 2010, at 4:06 AM, Micha Silver wrote: On 10/01/2010 01:35 AM, Adam Dershowitz, Ph.D., P.E. wrote: I have a series of points in an ascii files that represent points along a line. I would like to import them as a line, or import and convert to a line. I see that 6.5 has v.in.lines, but I am using 6.4. Is there any other way to do that conversion? The data is 3D x,y,z points. I can just import them using v.in.ascii, but then they are points, with no lines. Is there another way to either import, directly, or convert? If it's only one line, then the simplest might be to re-write the ASCII file formated in the GRASS standard format, as a line. You'll need to add the header lines, something like: VERTI: L n 1 X_coord Y_coord ... ... 1 1 Where 'n' is the number of points. Then run v.in.ascii ... format=standard and it should result in a line vector. Thanks. It is actually one line, at the moment, so I did that, and it worked fine. But I will have others. so was hoping for a generic solution. I wrote a shell script that transforms my particular data into standard and it seems to be working fine. Again, thanks for the response. --Adam___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] custom reports
hi all, how I can create my own reports, for example, if I have v.net.centrality which creates 4 new attributes, as I can get a report with the results of this calculation in an orderly manner and that the report has a header as desire, you can create pdf directly, but as I can do it in plain text. tahnks for your help and time Ricardo Rodríguez Univalle ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error when running a scrip in Windows-WinGRASS
Helena Herrera wrote: I have developed a Script to import Landsat images that runs just fine in Linux But when I compile (Msys) with this expressioN: make -C r.in.landsat MODULE_TOPDIR=/C/OSGeo4W/usr/src/grass-6.4.svn_src_snapshot_2010_09_04 and run in GRASS I get this error: xml.sax.parseString(getInterfaceDescription(cmd[0]).decode(enc).split('\n',1)[1].replace('', '?xml version=1.0 encoding=utf-8?\n', 1).encode(utf-8), IndexError: list index out of range 1- Is my compilation expression correct? 2- What am I missing on this? I'm not sure that Python scripts work in 6.x on Windows. I'm fairly sure that the build system *doesn't* handle Python scripts in 6.x on Windows. The main issue is that, on Windows, the build system installs a batch file which executes the actual script, and the batch file only works for shell scripts. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Application of r.color
Luis Lisboa wrote: I have a script where I create a map (using mapcalc) and I want to attribute a color (gray for instance) but it ranges from 0 to 5 so I cannot attribute gray0-1 neither gray0-255. What can I do to attribute a color table that stretches its color attibution to the image max and minimum values? color=grey maps the minimum value to black and the maximum to white. If you can't find an existing set of rules which produce the desired result, use rules= to specify custom rules. The syntax is documented in the r.colors manual page. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Application of r.color
On 10/01/2010 04:16 PM, Luis Lisboa wrote: Hi there I have a script where I create a map (using mapcalc) and I want to attribute a color (gray for instance) but it ranges from 0 to 5 so I cannot attribute gray0-1 neither gray0-255. What can I do to attribute a color table that stretches its color attibution to the image max and minimum values? How about creating a color rules file with percentages (instead of values), then, regardless of the actual raster values, the colors will be automatically spread between the min and max color. i.e. 0% 0 0 0 100% 255 255 255 This will create a spread of colors from black to white. Now in your script just apply this rules file. If the raster contains 5 values, they will get colored black, dark grey, mid grey, light grey, and white. Thanks Luis 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 Arava Development Co. +972-52-3665918 http://surfaces.co.il ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] location for temporal files
hi all, how I can create a temporary location for maps so that everything is calculated using the coordinate system which are the base files. ideas? thank you all for your time and help Ricardo Rodríguez Univalle ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] A Py-script where I check group and delete
Luisa Peña wrote: I have a Python-script where I create a group (using i.group) but, if the group already exists I need to eliminate (g.remove). My question is: How can I check, using Python Script code, if a group already exists? import grass.script as grass if grass.find_file(groupname, 'group)['file']: ... Or you could just call g.remove anyhow, e.g. grass.run_command('g.remove', group = groupname, stderr = file(os.devnull, 'w+')) -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] OBDC connection with postgresql in ubuntu 10.04 64 bits
hi all, how I can create ODBC connections with postgresql in Ubuntu 10.04 of 64 bits, since the ODBC plugin for postgresql is very different from what is documented to someone already done, I could explain it. thank you all for your time and help Ricardo Rodríguez Univalle ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] OBDC connection with postgresql in ubuntu 10.04 64 bits
Maybe this help you, although is in portuguese. http://eloiribeiro.wordpress.com/2009/01/27/criar-um-conector-odbc-para-postgresql-em-ubuntu/ By, Eloi Ribeiro GIS Analyst 39,45º -4,40º http://eloiribeiro.wordpress.com On Fri, Oct 1, 2010 at 20:13, Ricardo Rodríguez ricardorodo...@gmail.comwrote: hi all, how I can create ODBC connections with postgresql in Ubuntu 10.04 of 64 bits, since the ODBC plugin for postgresql is very different from what is documented to someone already done, I could explain it. thank you all for your time and help Ricardo Rodríguez Univalle ___ 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] OBDC connection with postgresql in ubuntu 10.04 64 bits
rpostgresql package- I use it and it works wonderfully. On Fri, Oct 1, 2010 at 1:42 PM, Eloi Ribeiro eloi.ribe...@gmail.com wrote: Maybe this help you, although is in portuguese. http://eloiribeiro.wordpress.com/2009/01/27/criar-um-conector-odbc-para-postgresql-em-ubuntu/ By, Eloi Ribeiro GIS Analyst 39,45º -4,40º http://eloiribeiro.wordpress.com On Fri, Oct 1, 2010 at 20:13, Ricardo Rodríguez ricardorodo...@gmail.com wrote: hi all, how I can create ODBC connections with postgresql in Ubuntu 10.04 of 64 bits, since the ODBC plugin for postgresql is very different from what is documented to someone already done, I could explain it. thank you all for your time and help Ricardo Rodríguez Univalle ___ 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 -- 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 A big computer, a complex algorithm and a long time does not equal science. -Robert Gentleman ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] R, Moran index, getis e ord.....
Maybe http://www.asdar-book.org/ can help you. Have a look in Additional materials. Robbie 2010/9/30 Gabriele N. gis...@libero.it Hello everyone. I have a raster which is the result of calculating an index of remote sensing (with decimals). I would like to calculate the Moran's index and the index of Getis and Ord To do this I installed R (following http://grass.fbk.eu/statsgrass/grass6_r_install.html). Then I installed the packages install.packages(spdep,dependencies=TRUE) install.packages(maptools,dependencies=TRUE) Then from the shell: R Then load these libraries library(spgrass6) library(spdep) library(maptools) library(boot) library(Matrix) library(lattice) I read the raster index_water_2009-readRAST6(index_water_2009) At this point I stopped. I saw on the mailing list and some tutorials. I can not understand the syntax to use. It only works on vector? Someone can give me some help? Thanks -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/R-Moran-index-getis-e-ord-tp5588509p5588509.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 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] A Py-script where I check group and delete
Luisa wrote: I have a Python-script where I create a group (using i.group) but, if the group already exists I need to eliminate (g.remove). My question is: How can I check, using Python Script code, if a group already exists? run g.findfile. There could be a grass python library shortcut for this, I'm not sure, check the python section of the GRASS Programmer's manual. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Import question
Adam wrote: I see that 6.5 has v.in.lines, but I am using 6.4. since it seems to be open season on backporting stuff, if there is widespread demand, and no objections, I'd consider backporting it for 6.4.1. but really it is just a wrapper script around v.in.mapgen. the most valuable thing about it is the easy to understand module name. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Possible to color lines in d.vect according to RGB column?
Tim wrote: Can someone please let me know if it is possible to assign custom colors to the lines around individual shapes in a vector file? it is possible, and in the past I've done it. I realize this is awkward because two adjacent shapes share a border, and yet may have a different RGB value in the attribute table. I suppose this could be solved by having the border be half the color of one and half the color of the other - but this may not be possible. My idea would be to have something like d.vect -a type=area map=provinces rgb_column=RGB Except instead of the rgb column specifying fill color, it specifies line color. my solution was to have a small (say 3mm) fill of color along the inside of each area boundary. I didn't have a nice automated solution, just added category numbers to the boundaries, ran v.buffer, used v.overlay to save only the side of the buffer which was inside each area, and then d.vect'ed the result with fcolor=R:G:B and color=none. a bit clunkly, but ISTR that it worked. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Import question
On Oct 1, 2010, at 4:18 PM, Hamish wrote: Adam wrote: I see that 6.5 has v.in.lines, but I am using 6.4. since it seems to be open season on backporting stuff, if there is widespread demand, and no objections, I'd consider backporting it for 6.4.1. but really it is just a wrapper script around v.in.mapgen. the most valuable thing about it is the easy to understand module name. Thanks. Once I heard that it is just a script, I downloaded it myself. So, don't backport it on my account. But, I do appreciate the thought. --Adam___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user