[GRASS-user] sqlbuilder (SELECT)

2011-03-23 Thread Vincent Bain
Hi list,
trying to manage a vector attribute table, I explored the sqlbuilder
menu (py gui, grass64, quite a bit old svn version -- say 2 months).

My query contains a modulus condition, so I guess I can use the "%"
button, but the query is qualified unvalid.

e.g I need to extract "z" value every 100 m from a contour line "topo"
vector map.
This statement :

SELECT z FROM topo WHERE z % 100 = 0

returns this error message :

SQL statement is not valid.
dbmi: Protocol error


Any idea of what I am doing wrong ?
Thank you,

Vincent.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-23 Thread Johannes Radinger

Am 23.03.2011 um 05:22 schrieb Glynn Clements:

> 
> Johannes Radinger wrote:
> 
>> I'd like to run a python script on my GRASS6.5 on MacOS.
>> 
>> I saved a *.py script for testing with following content on my desktop:
> 
>> All the needed files (upstream_part, shreve) are existing in the
>> location and mapset that is open. Then I tried to execute
>> File-->Launch Script and choose it. Then I just get back:
>> 
>> Launching script '/Users/Johannes Radinger/Desktop/mapcalc-test.py'...   
>>
>> (Tue Mar 22 10:57:15 2011)   
>>
>> /Users/Johannes Radinger/Desktop/mapcalc-test.py 
>>
>> (Tue Mar 22 10:57:15 2011) Command finished (0 sec)
>> 
>> and nothing happend and no map was created...
>> 
>> what is wrong with my script?
> 
> Does the script have execute permission ("chmod +x ...")?

The script has execute permission so far as I think, but anyway I ran chmod +x 
on the file...

> 
> Does MacOSX have the Python interpreter at /usr/bin/python?
> 
> It's common practice for Python scripts to use:
> 
>   #!/usr/bin/env python

my first script included #!/usr/bin/env python, but it failed (error message) 
it couldn't find python, thats why I googled  and found: 
http://macosx.com/forums/unix-x11/46163-how-do-i-run-python-script.html
that is why i used /usr/bin/python.

I just got the tip in forum to check for the line-endings in the file, they 
might cause the problem, so I will check that.

But anyway, is there any other possible reason why I fail?
Is there any Mac-User with Python-Script-Mapcalc experience?


> 
> which only requires that "python" is somewhere in $PATH, rather than
> assuming a fixed location. The Python scripts in 7.0 use this
> mechanism.
> 
> -- 
> Glynn Clements 


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.buffer problem (bug?)

2011-03-23 Thread Markus Neteler
On Wed, Mar 23, 2011 at 7:26 AM, leonidas  wrote:
> I'm using Grass 6.4.0 and I'm trying to generate a buffer for a polyline
> vector map. The problem is that v.buffer runs but it doesn't end. I give it
> a lot of time (+2 hours) but it didn't finish. Using the same file in QGIS
> the job done in less than a minute. What could be the problem? Is this a
> bug?

Likely yes. Could you please try the 6.4.1RC2 package? This bug was fixed
http://trac.osgeo.org/grass/ticket/994

Perhaps also the former version of v.buffer (the current version is a rewrite)
will be reactivated since it got fixed and performs better:
http://trac.osgeo.org/grass/ticket/699

In any case a test with 6.4.1RC2 is recommended.

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: v.buffer problem (bug?)

2011-03-23 Thread leonidas
Thank you Markus, I'll check it!

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/v-buffer-problem-bug-tp6199121p6199313.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] r.rescale - float instead of integer?

2011-03-23 Thread Johannes Radinger

Am 23.03.2011 um 05:29 schrieb Glynn Clements:

> 
> Johannes Radinger wrote:
> 
>> I try to rescale a rastermap with category values ranging from 1 to 16.
>> I want to rescale them by dividing the values by the maximum value, like
>> 1 --> 1/16, 10-->10/16 and 16 --> 1). I tried to do that with the r.rescale 
>> tool with setting the output range to 0,1 like:
>> 
>> r.rescale input=input output=output to=0.0,1.0
>> 
>> but it I don't get float values as a results, only 0 and 1 as
>> integers. Does r.rescale handle floats
> 
> No. r.rescale is a front-end to r.reclass, which only handles
> integers.
> 
> r.recode provides similar functionality to r.reclass for
> floating-point data (but it creates an entirely new map; reclass maps
> only support integer data).
> 
I looked at it but with r.code, I've to provide the input data range values as
fixed values (at least one) rather then saying use all values from min to max
as it is possible in rescale...


>> Or is there any other simple way to divide the single raster values
>> by the maximum value and get a float value as result?
> 
>   r.mapcalc "output = input / 16.0"

I think r.mapcalc is probably the best solution, but as I don't know the maximum
value in every case (I've to process several maps), I wanted to automatize.
Probably I've to write a script to read the max value and parse it to the 
mapcalc function.
My problem: First, I don't know how to do that, Second there is this 
python-script issue
on my mac (see other thread)...


> 
> -- 
> Glynn Clements 
> ___
> 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] Calling GRASS scripts from GRASS C modules

2011-03-23 Thread Markus Neteler
On Wed, Mar 23, 2011 at 5:14 AM, Glynn Clements
 wrote:
>
> Markus Neteler wrote:
>
>> > 7.0 has G_popen_{read,write}, which do most of the work for you, but
>> > these haven't been back-ported to 6.x yet.
>>
>> I have compared the two lib/gis/popen.c files. Is backport as "easy" as
>> adding the GRASS 7 functions in 6 to also keep the old G_popen() and
>> G_pclose() for backward compatibility?
>
> Yes.
>
> But the existing G_popen() and G_pclose() functions should either be
> removed or replaced with:
>
>        FILE *G_popen(const char *cmd, const char *mode)
>        {
>            return popen(cmd, mode);
>        }
>
>        int G_pclose(FILE *ptr)
>        {
>            return pclose(ptr);
>        }
>
> There's no reason to (attempt to) provide our own implementations of
> these functions, particularly when the Windows version is completely
> broken.
>
> Note that G_popen() has already been removed from 6.5, with the code
> changed to use popen() instead. This still suffers from the usual
> issues with trying to reliably construct a shell command, but it
> avoids the G_popen()-specific bugs.

So I will replace the existing popen.c file in 6.4.svn with the code above.
It goes into 6.4.2 then.

> In 7.0, all references to popen() have been removed, and the only use
> of system() is in D_close_driver(), to execute a shell command
> specified by the GRASS_NOTIFY environment variable.

ok.

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-23 Thread Nick Cahill


I haven't run python scripts from within GRASS, but have found that they won't 
run if the line breaks are not unix line breaks, rather than Mac or Windows - 
which you'll get if you write the script in some applications. 

BBEdit is a very good editor on the Mac and will run python scripts within the 
editor. I think there's a free version too - text wrangler. 

Nick Cahill


On Mar 23, 2011, at 2:29 AM, Johannes Radinger wrote:

> 
> Am 23.03.2011 um 05:22 schrieb Glynn Clements:
> 
>> 
>> Johannes Radinger wrote:
>> 
>>> I'd like to run a python script on my GRASS6.5 on MacOS.
>>> 
>>> I saved a *.py script for testing with following content on my desktop:
>> 
>>> All the needed files (upstream_part, shreve) are existing in the
>>> location and mapset that is open. Then I tried to execute
>>> File-->Launch Script and choose it. Then I just get back:
>>> 
>>> Launching script '/Users/Johannes Radinger/Desktop/mapcalc-test.py'...  
>>> 
>>> (Tue Mar 22 10:57:15 2011)  
>>> 
>>> /Users/Johannes Radinger/Desktop/mapcalc-test.py
>>> 
>>> (Tue Mar 22 10:57:15 2011) Command finished (0 sec)
>>> 
>>> and nothing happend and no map was created...
>>> 
>>> what is wrong with my script?
>> 
>> Does the script have execute permission ("chmod +x ...")?
> 
> The script has execute permission so far as I think, but anyway I ran chmod 
> +x on the file...
> 
>> 
>> Does MacOSX have the Python interpreter at /usr/bin/python?
>> 
>> It's common practice for Python scripts to use:
>> 
>>  #!/usr/bin/env python
> 
> my first script included #!/usr/bin/env python, but it failed (error message) 
> it couldn't find python, thats why I googled  and found: 
> http://macosx.com/forums/unix-x11/46163-how-do-i-run-python-script.html
> that is why i used /usr/bin/python.
> 
> I just got the tip in forum to check for the line-endings in the file, they 
> might cause the problem, so I will check that.
> 
> But anyway, is there any other possible reason why I fail?
> Is there any Mac-User with Python-Script-Mapcalc experience?
> 
> 
>> 
>> which only requires that "python" is somewhere in $PATH, rather than
>> assuming a fixed location. The Python scripts in 7.0 use this
>> mechanism.
>> 
>> -- 
>> Glynn Clements 
> 
> 
> ___
> 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


[GRASS-user] gui wxPython2.5 and 2.6 problem on Mac, Path?

2011-03-23 Thread Johannes Radinger
Hej...

because I had problems running a python script and the /usr/bin/env... I was 
looking which pyhton is in /usr/bin... there I found Python2.6 and 
Python2.5It seems that they were probably in the wrong order in PATH i 
thoughtin the Python2.6 folder in my Application ther was a file called 
"Update Shell Profile.command" and it was recommended in a forum to run that...
...so and now a big problem started: My wxpython gui isn't working anymore. 
wxpython, numpy and scipy are installed modules on my mac, but I get following 
error when I start GRASS GIS6.5:

Welcome to GRASS 6.5.svn (2011) 
GRASS homepage:  http://grass.osgeo.org/
This version running thru:   Bash Shell (/bin/bash)
Help is available with the command:  g.manual -i
See the licence terms with:  g.version -c
Start the GUI with:  g.gui wxpython
When ready to quit enter:exit

GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
Launching 'wxpython' GUI in the background, please wait ...
GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
Launching 'wxpython' GUI in the background, please wait ...
GRASS 6.5.svn (Treene_location):~ > Traceback (most recent call last):
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1630, in 
Traceback (most recent call last):
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1630, in 
sys.exit(main())
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1623, in main
sys.exit(main())
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1623, in main
app = GMApp(workspaceFile)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1522, in __init__
app = GMApp(workspaceFile)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1522, in __init__
wx.App.__init__(self, False)
  File 
"/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
 line 7978, in __init__
wx.App.__init__(self, False)
  File 
"/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
 line 7978, in __init__
self._BootstrapApp()
self._BootstrapApp()
  File 
"/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
 line 7552, in _BootstrapApp
  File 
"/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
 line 7552, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1540, in OnInit
return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
1540, in OnInit
timeout = 2000, parent = None, id = wx.ID_ANY)
TypeError: __init__() got an unexpected keyword argument 'extrastyle'
timeout = 2000, parent = None, id = wx.ID_ANY)
TypeError: __init__() got an unexpected keyword argument 'extrastyle'


it seems that there is a problem that i have two versions of python and maybe 
GRASS can work only with python2.5... I tried a recompilation of GRASS, but 
still fail...

it is not a problem of GRASS itself but more of my set environemtal variables 
in the Path i think, but I don't know...

how can I check that, how can I set the Path correctly? 

..how can I solve that problem?

/johannes


-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey
Hey,

I have a point cloud and I would need the z-coordinate of each point as
attribute. Is there a possibility to extract the z-coordinate and write the
corresponding value into the attribute table of each point?

Thanks, 
Tim

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6199821.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] sqlbuilder (SELECT)

2011-03-23 Thread Vincent Bain
Whoops, sorry for the noise. I give an auto-reply (may it help ) :

working on a new Location/mapset, I forgot to switch db driver to sth
else than dbf. Modulo seems not to be supported by the dbf driver (it is
a matching operator, dedicated to character fields).
Back to pg driver, the statement is valid.

Bye,
Vincent.


Le mercredi 23 mars 2011 à 08:26 +0100, Vincent Bain a écrit :
> Hi list,
> trying to manage a vector attribute table, I explored the sqlbuilder
> menu (py gui, grass64, quite a bit old svn version -- say 2 months).
> 
> My query contains a modulus condition, so I guess I can use the "%"
> button, but the query is qualified unvalid.
> 
> e.g I need to extract "z" value every 100 m from a contour line "topo"
> vector map.
> This statement :
> 
> SELECT z FROM topo WHERE z % 100 = 0
> 
> returns this error message :
> 
> SQL statement is not valid.
> dbmi: Protocol error
> 
> 
> Any idea of what I am doing wrong ?
> Thank you,
> 
> Vincent.
> 
> ___
> 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] How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Vincent Bain
If your map is a 3d vector, v.db.connect will do the job.
First create 3 new numeric fields in the table (x,y,z), run v.db.connect
with the coord option : it will feed these attributes. 
Then you can drop x,y columns if you don't need them anymore.

Vincent

Le mercredi 23 mars 2011 à 06:29 -0700, TimNorwey a écrit :
> Hey,
> 
> I have a point cloud and I would need the z-coordinate of each point as
> attribute. Is there a possibility to extract the z-coordinate and write the
> corresponding value into the attribute table of each point?
> 
> Thanks, 
> Tim
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6199821.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


[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey

Vincent Bain wrote:
> 
> If your map is a 3d vector, v.db.connect will do the job.
> First create 3 new numeric fields in the table (x,y,z), run v.db.connect
> with the coord option : it will feed these attributes. 
> Then you can drop x,y columns if you don't need them anymore.
> 

Thank you for you quick answer. 

I added the the columns, but I can´t find the coord option within
v.db.connect?

Thanks, 
Tim

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200459.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] gui wxPython2.5 and 2.6 problem on Mac, Path?

2011-03-23 Thread William Kyngesburye
GRASS on the Mac uses Python from a wrapper.  This is because wxPython (for the 
GUI) can't run 64bit, but that is what Python does on OSX 10.6.  So the wrapper 
forces it to run 32bit.  The GRASS startup will usually find the correct Python 
for the wrapper to use.  It will look in the order (always looking for the 
version it was compiled with):

GRASS_PYTHON
shell PATH
python.org Python in /Library/Frameworks
system Python

That /Applications python .command is probably for the python.org Python, which 
you must have installed at some time.  This will put the python.org Python 
before the system Pyhon in the shell PATH.

What does the rest of the startup output in the Terminal say?  (scroll up to 
see it)  It should identify which Python it found.

There should not be any problem with GRASS and Python 2.6, and the python 
version should agree with what wxPython was made for, which looks like 2.6 for 
yours.

Maybe something broke in a recent revision of GRASS?

On Mar 23, 2011, at 8:21 AM, Johannes Radinger wrote:

> Hej...
> 
> because I had problems running a python script and the /usr/bin/env... I was 
> looking which pyhton is in /usr/bin... there I found Python2.6 and 
> Python2.5It seems that they were probably in the wrong order in PATH i 
> thoughtin the Python2.6 folder in my Application ther was a file called 
> "Update Shell Profile.command" and it was recommended in a forum to run 
> that...
> ...so and now a big problem started: My wxpython gui isn't working anymore. 
> wxpython, numpy and scipy are installed modules on my mac, but I get 
> following error when I start GRASS GIS6.5:
> 
> Welcome to GRASS 6.5.svn (2011) 
> GRASS homepage:  http://grass.osgeo.org/
> This version running thru:   Bash Shell (/bin/bash)
> Help is available with the command:  g.manual -i
> See the licence terms with:  g.version -c
> Start the GUI with:  g.gui wxpython
> When ready to quit enter:exit
> 
> GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
> Launching 'wxpython' GUI in the background, please wait ...
> GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
> Launching 'wxpython' GUI in the background, please wait ...
> GRASS 6.5.svn (Treene_location):~ > Traceback (most recent call last):
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1630, in 
> Traceback (most recent call last):
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1630, in 
>sys.exit(main())
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1623, in main
>sys.exit(main())
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1623, in main
>app = GMApp(workspaceFile)
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1522, in __init__
>app = GMApp(workspaceFile)
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1522, in __init__
>wx.App.__init__(self, False)
>  File 
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7978, in __init__
>wx.App.__init__(self, False)
>  File 
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7978, in __init__
>self._BootstrapApp()
>self._BootstrapApp()
>  File 
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7552, in _BootstrapApp
>  File 
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7552, in _BootstrapApp
>return _core_.PyApp__BootstrapApp(*args, **kwargs)
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1540, in OnInit
>return _core_.PyApp__BootstrapApp(*args, **kwargs)
>  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", 
> line 1540, in OnInit
>timeout = 2000, parent = None, id = wx.ID_ANY)
> TypeError: __init__() got an unexpected keyword argument 'extrastyle'
>timeout = 2000, parent = None, id = wx.ID_ANY)
> TypeError: __init__() got an unexpected keyword argument 'extrastyle'
> 
> 
> it seems that there is a problem that i have two versions of python and maybe 
> GRASS can work only with python2.5... I tried a recompilation of GRASS, but 
> still fail...
> 
> it is not a problem of GRASS itself but more of my set environemtal variables 
> in the Path i think, but I don't know...
> 
> how can I check that, how can I set the Path correctly? 
> 
> ..how can I solve that problem?
> 
> /johannes
> 
> 
> -- 
> NEU: FreePhone - kostenlos mobil telefonieren und surfen! 
> Jetzt informieren: http://www.gmx.net/de/go/freephone
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://li

Re: [GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Vincent Bain
Tim,
sorry for the mistake, I meant v.to.db
(with option=coor and columns=x,y,z)

Vincent


Le mercredi 23 mars 2011 à 07:29 -0700, TimNorwey a écrit :
> Vincent Bain wrote:
> > 
> > If your map is a 3d vector, v.db.connect will do the job.
> > First create 3 new numeric fields in the table (x,y,z), run v.db.connect
> > with the coord option : it will feed these attributes. 
> > Then you can drop x,y columns if you don't need them anymore.
> > 
> 
> Thank you for you quick answer. 
> 
> I added the the columns, but I can´t find the coord option within
> v.db.connect?
> 
> Thanks, 
> Tim
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200459.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


[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey
I tried to do this, but an error occurred, but I don´t really understand what
it means (see below)

http://osgeo-org.1803224.n2.nabble.com/file/n6200570/error.png 

In my attribute table I have the tables x,y,z and cat ... all include just
NULL-values.

Thanks,
Tim




--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200570.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] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Rich Shepard

On Wed, 23 Mar 2011, TimNorwey wrote:


In my attribute table I have the tables x,y,z and cat ... all include just
NULL-values.


  Try db.info to see what is in the source table. I've found data from
agencies that do not have the attribute data they should.

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] gui wxPython2.5 and 2.6 problem on Mac, Path?

2011-03-23 Thread Johannes Radinger

 Original-Nachricht 
> Datum: Wed, 23 Mar 2011 09:29:21 -0500
> Von: William Kyngesburye 
> An: Johannes Radinger 
> CC: grass-user@lists.osgeo.org
> Betreff: Re: [GRASS-user] gui wxPython2.5 and 2.6 problem on Mac, Path?

> GRASS on the Mac uses Python from a wrapper.  This is because wxPython
> (for the GUI) can't run 64bit, but that is what Python does on OSX 10.6.  So
> the wrapper forces it to run 32bit.  The GRASS startup will usually find the
> correct Python for the wrapper to use.  It will look in the order (always
> looking for the version it was compiled with):
> 
> GRASS_PYTHON
> shell PATH
> python.org Python in /Library/Frameworks
> system Python
> 
> That /Applications python .command is probably for the python.org Python,
> which you must have installed at some time.  This will put the python.org
> Python before the system Pyhon in the shell PATH.
> 
> What does the rest of the startup output in the Terminal say?  (scroll up
> to see it)  It should identify which Python it found.
> 
> There should not be any problem with GRASS and Python 2.6, and the python
> version should agree with what wxPython was made for, which looks like 2.6
> for yours.
> 
> Maybe something broke in a recent revision of GRASS?

I just found following forum 
post:http://www.mail-archive.com/grass-user@lists.osgeo.org/msg17961.html
It seems that this TypeError: __init__() got an unexpected keyword argument 
'extrastyle' is caused by the combination of wxpython 2.8.11.0 and the newest 
GRASS sources so far as I understand... In my case that appeared maybe because 
I changed my python to 2.6.6 and to this version of wxpython on my mac...

So which GRASS source version should work for compiling (either 6.5 or 7.0) 
Maybe someone has a link.

Or is there any other problem/reason why my grass isn't working?

thanks
/Johannes




> 
> On Mar 23, 2011, at 8:21 AM, Johannes Radinger wrote:
> 
> > Hej...
> > 
> > because I had problems running a python script and the /usr/bin/env... I
> was looking which pyhton is in /usr/bin... there I found Python2.6 and
> Python2.5It seems that they were probably in the wrong order in PATH i
> thoughtin the Python2.6 folder in my Application ther was a file called
> "Update Shell Profile.command" and it was recommended in a forum to run
> that...
> > ...so and now a big problem started: My wxpython gui isn't working
> anymore. wxpython, numpy and scipy are installed modules on my mac, but I get
> following error when I start GRASS GIS6.5:
> > 
> > Welcome to GRASS 6.5.svn (2011) 
> > GRASS homepage:  http://grass.osgeo.org/
> > This version running thru:   Bash Shell (/bin/bash)
> > Help is available with the command:  g.manual -i
> > See the licence terms with:  g.version -c
> > Start the GUI with:  g.gui wxpython
> > When ready to quit enter:exit
> > 
> > GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
> > Launching 'wxpython' GUI in the background, please wait ...
> > GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
> > Launching 'wxpython' GUI in the background, please wait ...
> > GRASS 6.5.svn (Treene_location):~ > Traceback (most recent call last):
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1630, in 
> > Traceback (most recent call last):
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1630, in 
> >sys.exit(main())
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1623, in main
> >sys.exit(main())
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1623, in main
> >app = GMApp(workspaceFile)
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1522, in __init__
> >app = GMApp(workspaceFile)
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1522, in __init__
> >wx.App.__init__(self, False)
> >  File
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7978, in __init__
> >wx.App.__init__(self, False)
> >  File
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7978, in __init__
> >self._BootstrapApp()
> >self._BootstrapApp()
> >  File
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7552, in _BootstrapApp
> >  File
> "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>  line 7552, in _BootstrapApp
> >return _core_.PyApp__BootstrapApp(*args, **kwargs)
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 
> 1540, in OnInit
> >return _core_.PyApp__BootstrapApp(*args, **kwargs)
> >  File
> "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxp

[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey


> Try db.info to see what is in the source table. 
> 

I can´t find db.info. Can you please give me the link to the manual or
something else where it is described?

Thanks,
tim

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200622.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] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Vincent Bain
I would suggest there is something wong between your geometry and data
attached in your table. Did you try v.category in order to clean it up ?

http://grass.osgeo.org/grass64/manuals/html64_user/v.category.html



Le mercredi 23 mars 2011 à 07:59 -0700, TimNorwey a écrit :
> I tried to do this, but an error occurred, but I don´t really understand what
> it means (see below)
> 
> http://osgeo-org.1803224.n2.nabble.com/file/n6200570/error.png 
> 
> In my attribute table I have the tables x,y,z and cat ... all include just
> NULL-values.
> 
> Thanks,
> Tim
> 
> 
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200570.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


[GRASS-user] v.surf.rst question

2011-03-23 Thread Bulent Arikan
Dear List,

I have 30m ASTER DEM from a region (UTM-37) which I am trying to interpolate
using ' v.surf.rst ' to obtain 10m resolution DEMs. I prefer this module
since I will also need additional maps such as slope, aspect, prof curv,
etc. I will try describing my problem below and I will appreciate any
suggestions/ideas. Since the original 30m res. image covers a large area, I
cropped it into several tiles using 'r.mapcalc'. Each tile has about 12
million cells in 30m res. and 115 million cells in 10m res. and takes an
average of 4 hrs to complete one run of v.surf.rst. I sample each tile using
'r.random' at 50%. Then I change the region settings in 'g.region': I align
region to resolution and set the resolution to 10m before running
v.surf.rst . I ran the module at different tension
settings (55., 40., 25. and 10.) while keeping smoothing parameter (.1) and
other parameters at default settings. When I add legend to my 10m DEM from
the toolbar in Map Display, the elevation range is usually a couple meters
above or below the original map. After each run, I set my region resolution
back to 30m, and using r.mapcalc, I prepare a "difference" map [ (30m DEM) -
(10m DEM) ]. In this map, I get extremely high and low values (i.e., the
range in the difference map can be -70 to 183 suggesting to me that there is
both over- and undershooting), which seem to be limited to mountain tops and
some canyons. When I run 'r.report', I can see that actually these "extreme"
values are limited to very few cells (about 3-5% of 12 million cells) and
the main variation for 95% of cells is within more reasonable range such as
+/- 3 meters. I recently became aware of some accuracy issues related to
ASTER DEMs especially in mountainous areas however, I have the same issue
for flat parts of this landscape as well.

My question is: How can I fix the issue of having these few cells with
extreme values?

I am thinking that:

- I may be having this problem because I am trying to interpolate images
that are too large (crop tiles of smaller areas?),

- I may be able to fix the negative cells by making them NULL and then using
' r.fill.nulls' module but even if this is advisable, I do not know of a
solution for higher than normal value cells.

Again, I appreciate your ideas and suggestions. Thank you,


-- 
BÜLENT
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Add a color to a vector

2011-03-23 Thread Markus Neteler
On Tue, Mar 22, 2011 at 10:45 PM, Monica Buescu
 wrote:
> Greetings
> I have produced in winGRASS  6.4.0 stable a vector (by converting from
> raster to vector) and I want to add a color. how can I do that inside a
> Python Script?

I guess that
grass70/scripts/v.colors/v.colors.py

could be helpful.

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Rich Shepard

On Wed, 23 Mar 2011, TimNorwey wrote:


I cant find db.info. Can you please give me the link to the manual or
something else where it is described?


tim,

  After I sent the message I realized that you're working with a raster map,
not a vector map with a separate database table. I'm out of ideas on how to
move the x, y, and z values from the raster to a database table.

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] GRASS plugin

2011-03-23 Thread John C. Tull
Hi Sören,

That was a nice tutorial. I look forward to trying this approach out on my 
system.

Regards,
John

On Mar 21, 2011, at 4:28 PM, Soeren Gebbert wrote:

> Hello,
> IMHO the WPS (web processing service) approach to use GRASS GIS within
> QGIS might be a better solution? All the location, projection and
> mapset overhead would be avoided and the integration into QGIS would
> be more intuitive. Additionally using the WPS approach will also make
> Sextante, ArcGIS and other geo processing capabilities available in
> QGIS. Also cloud geo processing will be available using this approach.
> I would suggest to largely improve the existing WPS plugin from Horst
> Düster (and partially me) to make QGIS to one of the best WPS clients
> available.
> 
> Here an example of the capabilities of the current WPS QGIS - GRASS
> GIS 7 approach:
> http://www.youtube.com/watch?v=zCnax9w1bCs
> 
> As far as i know the grass libraries are not designed to be used in
> long running persistent applications, so there will always be problems
> and a large effort migrating new GRASS GIS versions in QGIS. A WPS
> client would be completely independent from changes in GRASS GIS API
> or modules and will work with many other WPS backends.
> 
> Just my 2C
> Sören
> 
> 2011/3/21 Paolo Cavallini :
>> Hi all.
>> The GRASS plugin does not have a maintainer since long. We at Faunalia
>> have done some smaller fixes, and financed, together with others, some
>> more bugfixing, through[0].
>> This situation is not ideal: without regular maintenance, bugs creep in,
>> and eventually major problems come out. Currently we have several
>> serious issues on vectors in Windows. It is therefore important that
>> someone fixes this, in order GRASS will remain fully usable from QGIS,
>> on all operating systems.
>> I'm therefore asking all the serious GRASS-QGIS users to step up and
>> give a hand, with either developer time or money. You are free not to do
>> it, but if you do it the future of this important tool will be bright
>> and reliable.
>> All the best.
>> --
>> http://www.faunalia.it/pc
>> 
>> [0]http://www.qgis.org/wiki/Bugs
>> 
>> ___
>> 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

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Saber
r.to.vect
or
v.what.rast

can possibly help

Cheers
Saber

> On Wed, 23 Mar 2011, TimNorwey wrote:
>
>> I cant find db.info. Can you please give me the link to the manual or
>> something else where it is described?
>
> tim,
>
>After I sent the message I realized that you're working with a raster
> map,
> not a vector map with a separate database table. I'm out of ideas on how
> to
> move the x, y, and z values from the raster to a database table.
>
> Rich
> ___
> 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


[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey


> tim,
>After I sent the message I realized that you're working with a raster
> map,
> not a vector map with a separate database table. I'm out of ideas on how
> to
> move the x, y, and z values from the raster to a database table.
> 

Hey.

No, I´m working with vector data. I imported the data via v.in.ascii from a
.csv-file. 

And now I´m really confused. Vincent you said that it could be that there is
something wring between the data and the table. So I deleted the point cloud
and imported it again. Now I have the problem that there is no corresponding
table in my directory (/Grass_Database/Location/Mapset/dbf). 

thanks,
tim

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200793.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] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Vincent Bain
Tim,
the relative dispersion of our answers might be due to a lack of
description of what your actually want to do.

If you're still stuck, try to re-expose your problem clearly.

Yours,
Vincent.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey


> Tim,
> the relative dispersion of our answers might be due to a lack of
> description of what your actually want to do.
> 
> If you're still stuck, try to re-expose your problem clearly.
> 

Sry for that. I will try it again.

A basis I have a .csv-file including LIDAR points. I imported that csv-file
via v.in.ascii into location A. Because I need this data in another
projection, I created a location B and used v.proj to reproject the point
cloud from location A to location B.

Now I would need the z-coordinate as attribute to it´s corresponding point.

As you recommended I tried to add the tables (v.db.addcol) and this worked.
Then I wanted to fill the columns using v.to.db. But this didn´t work. 

Then I deleted all the files and imported the csv-file again using the same
workflow as before. Now I have the problem that there is no corresponding
table in the dbf-directory and so I cannot try to add columns as before.

I hope it´s all a little bit clearer. 

Thanks,
tim

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200870.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] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Vincent Bain
Tim,

Let's consider your source file is a simple x,y,z file (comma separated
values).
First run :
v.in.ascii input=/path/to/your/lidar/source/file output=lidar fs=, x=1
y=2 z=3

Your point cloud was imported in 3d vector mode but not yet connected to
an attribute table. Do this this way :
v.db.addtable map=lidar columns='cat integer,x double precision,y double
precision, z double precision'

To that point a table is connected to your vector and necessary fields
were added to the table. So you can upload x,y,z values to the table :
v.to.db map=lidar type=point option=coor columns=x,y,z

then drop x and y cols :
v.db.dropcol map=lidar column=x
v.db.dropcol map=lidar column=y

And you're done (hope so).

Good luck,
Vincent.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey


> Your point cloud was imported in 3d vector mode but not yet connected to
> an attribute table. Do this this way :
> v.db.addtable map=lidar columns='cat integer,x double precision,y double
> precision, z double precision'
> 

--> worked fine



> To that point a table is connected to your vector and necessary fields
> were added to the table. So you can upload x,y,z values to the table :
> v.to.db map=lidar type=point option=coor columns=x,y,z
> 

--> Unfortunately, this executed with an error. Only in the first row of the
attribute table the coordinates are added. 
It is said that there are 43 categories that have "more elements" and so the
coordinates are not loaded (see below)

http://osgeo-org.1803224.n2.nabble.com/file/n6201431/errorNew.png 

Thank you very much for your assistance!

Tim


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201431.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] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Micha Silver

On 03/23/2011 08:35 PM, TimNorwey wrote:




Your point cloud was imported in 3d vector mode but not yet connected to
an attribute table. Do this this way :
v.db.addtable map=lidar columns='cat integer,x double precision,y double
precision, z double precision'


-->  worked fine




To that point a table is connected to your vector and necessary fields
were added to the table. So you can upload x,y,z values to the table :
v.to.db map=lidar type=point option=coor columns=x,y,z


-->  Unfortunately, this executed with an error. Only in the first row of the
attribute table the coordinates are added.
It is said that there are 43 categories that have "more elements" and so the
coordinates are not loaded (see below)


Could there be other extraneous values somewhere in the original ascii 
file? Maybe rows with an extra comma, or other characters? Can you make 
a bunch of rows available online somewhere so that we can have a look?


Another point you might want to take advantage of: v.in.ascii has an 
option (-z) to create a 3D vector. This means that each point's geometry 
consists of x,y, and z. So you then have the elevation available even if 
the values are not actually in the attribute table. For example, you can 
interpolate a dem from a 3D vector with no attribute table at all.



http://osgeo-org.1803224.n2.nabble.com/file/n6201431/errorNew.png

Thank you very much for your assistance!

Tim


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201431.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

This mail was received via Mail-SeCure System.





--
Micha Silver
Arava Development Co. +972-52-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] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread Vincent Bain
no idea of the problem, only suggestions :

* I would try to resample categories (v.category, option=del, then
v.category option=add) before processing v.to.db

* Could it be a db driver issue. In this case, you could try e.g. driver
sqlite.

* test on a subset of your lidar source file

*...

Hang in there !
Vincent.


Le mercredi 23 mars 2011 à 11:35 -0700, TimNorwey a écrit :
> 
> > Your point cloud was imported in 3d vector mode but not yet connected to
> > an attribute table. Do this this way :
> > v.db.addtable map=lidar columns='cat integer,x double precision,y double
> > precision, z double precision'
> > 
> 
> --> worked fine
> 
> 
> 
> > To that point a table is connected to your vector and necessary fields
> > were added to the table. So you can upload x,y,z values to the table :
> > v.to.db map=lidar type=point option=coor columns=x,y,z
> > 
> 
> --> Unfortunately, this executed with an error. Only in the first row of the
> attribute table the coordinates are added. 
> It is said that there are 43 categories that have "more elements" and so the
> coordinates are not loaded (see below)
> 
> http://osgeo-org.1803224.n2.nabble.com/file/n6201431/errorNew.png 
> 
> Thank you very much for your assistance!
> 
> Tim
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201431.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] problems after recent update (libgdal1.7.0?)

2011-03-23 Thread Maris Nartiss
Is Your MySQL running fine?
Recompiling MySQL and GDAL might help.

Not a GRASS issue.

Maris.

http://bugs.mysql.com/bug.php?id=23151


2011/3/23, Antonio Rodríguez :
> Hi,
>
> After a recent update on my Debian/testing machine I can't run the graphical
> environment of Grass. I get the messages showed on the images below:
>
> Hope is enough to find out an answer
>
> Cheers
>
> Antonio
>
> [image: snapshot1.png][image: snapshot2.png][image: snapshot3.png]
>
>
> [image: snapshot4.png]
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: How to extract z-coordiante and write it into attribute table?

2011-03-23 Thread TimNorwey


> Could there be other extraneous values somewhere in the original ascii 
> file? Maybe rows with an extra comma, or other characters? Can you make 
> a bunch of rows available online somewhere so that we can have a look?
> 
Returns v.in.ascii no error if I´m importing something that isn´t in the
right format?
Here a part of my csv file: 
http://osgeo-org.1803224.n2.nabble.com/file/n6201677/testData.csv
testData.csv 



> Another point you might want to take advantage of: v.in.ascii has an 
> option (-z) to create a 3D vector. This means that each point's geometry 
> consists of x,y, and z. So you then have the elevation available even if 
> the values are not actually in the attribute table. For example, you can 
> interpolate a dem from a 3D vector with no attribute table at all.
> 

Thank you for the hint, but I used the -z option. I need the elevation in
addition.

Thanks,
Tim



--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201677.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] Re: [gdal-dev] Reproject Landsat USGS image

2011-03-23 Thread Helmut Kudrnovsky

Hi,

>For now GDAL15 (the one that comes with winGRASS GIS) and GDAL16 binary.
>Why?

FYI, the nightly wingrass-installer-builds are now shipped with a default 
gdal18.

best regards
Helmut

___
WEB.DE DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt mit 
gratis Handy-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2


smime.p7s
Description: S/MIME Cryptographic Signature
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] simple shell scrip example with parameters

2011-03-23 Thread Daniel Victoria
Not sure this is the best way to do but, if you are using bash in
linux, the variables $1 $2 and so on are the parameters you pass to
the script. So, if you have a script called basin.sh and you type

basin.sh -23 -47

the variable $1 will be -23 and $2 will be -47...

so in your script you could put

r.water.outlet drainadge=your_map basin=basin_map easting=$2 northing=$1

you could also pass a third parameter for the basin map name...

Here is a good online tutorial for bash scripting
http://www.linuxconfig.org/Bash_scripting_Tutorial

Boa sorte
Daniel

On Tue, Mar 22, 2011 at 5:25 PM, Marcello Benigno
 wrote:
> Hi All,
>
> I need build one script shell for GRASS that receive two parameters (x and y
> coordinates) and calculate the r.water.outlet to this point, but I'm newbie
> in shell programming. Anyone have a example or link to show something
> similar? In my tests I can run one simple script, without parameters, and
> now thats the point.
>
> Thanks in advance,
> --
> Marcello Benigno B. de Barros Filho
> Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
> Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
> http://profmarcello.blogspot.com
> http://about.me/marcello.benigno
>
> ___
> 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] r.rescale - float instead of integer?

2011-03-23 Thread Hamish
Johannes wrote:
> I think r.mapcalc is probably the best solution, but as I don't know
> the maximum value in every case (I've to process several maps), I wanted
> to automatize. Probably I've to write a script to read the max value and
> parse it to the mapcalc function.

g.mlist + 'r.info -r' in a loop.


Hamish



  
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.surf.rst question

2011-03-23 Thread Micha Silver


  
  
On 23/03/2011 17:18, Bulent Arikan wrote:
Dear List,
  
  I have 30m ASTER DEM from a region (UTM-37) which I am trying to
  interpolate using ' v.surf.rst ' to obtain 10m resolution DEMs. I
  prefer this module since I will also need 

If you're starting with an ASTER DEM (GTiff?) then don't you want to
be using r.resamp.rst to interpolate to a higher resolution ??  This
module creates, on the way, slope, aspect, curves, etc.
Also, one additional point the bears mentioning. If you simply
change the resolution to 10m then use r.mapcalc to make a new copy
of the original DEM, it  will have the newer resolution. This method
doesn't do any sophisticated interpolation, just calculates new
values for higher res cells by (I think) nearest neighbor.  But
since you're dealing from the start with the ASTER data, which might
have anomalies anyway, maybe this approach might be good enough. It
will certainly be *much* faster to run r.mapcalc at higher res than
to do an interpolation.
Might be worth to cut out a small mountainous region and try both
r.mapcalc and r.resamp.rst then compare them...

Please post whatever you decide to do in the end.


additional maps such as slope, aspect, prof curv, etc.
  I will try describing my problem below and I will appreciate any
  suggestions/ideas. Since the original 30m res. image covers a
  large area, I cropped it into several tiles using 'r.mapcalc'.
  Each tile has about 12 million cells in 30m res. and 115 million
  cells in 10m res. and takes an average of 4 hrs to complete one
  run of v.surf.rst. I sample each tile using 'r.random' at 50%.
  Then I change the region settings in 'g.region': I align region to
  resolution and set the resolution to 10m before running  v.surf.rst.
  I ran the module at different tension settings (55., 40., 25. and
  10.) while keeping smoothing parameter (.1) and other parameters
  at default settings. When I add legend to my 10m DEM from the
  toolbar in Map Display, the elevation range is usually a couple
  meters above or below the original map. After each run, I set my
  region resolution back to 30m, and using r.mapcalc, I prepare a
  "difference" map [ (30m DEM) - (10m DEM) ]. In this map, I get
  extremely high and low values (i.e., the range in the difference
  map can be -70 to 183 suggesting to me that there is both over-
  and undershooting), which seem to be limited to mountain tops and
  some canyons. When I run 'r.report', I can see that actually these
  "extreme" values are limited to very few cells (about 3-5% of 12
  million cells) and the main variation for 95% of cells is within
  more reasonable range such as +/- 3 meters. I recently became
  aware of some accuracy issues related to ASTER DEMs especially in
  mountainous areas however, I have the same issue for flat parts of
  this landscape as well. 
  
  
  My question is: How can I fix the issue of having these few
cells with extreme values?

I am thinking that:
  
- I may be having this problem because I am trying to
interpolate images that are too large (crop tiles of smaller
areas?),

- I may be able to fix the negative cells by making them NULL
and then using ' r.fill.nulls' module but even if this is
advisable, I do not know of a solution for higher than normal
value cells.
  
Again, I appreciate your ideas and suggestions. Thank you,


-- 
BÜLENT 





  
  
  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
052-3666918
http://www.surfaces.co.il
  

  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user