RE: [GRASS-user] install grass with new wxPython user interface in Ubuntu

2008-09-19 Thread Hamish
[cc list]

Jhon Ortiz wrote:
  But with this errors:
  **
  Errors in:
  /usr/local/src/grass-6.3.0/visualization/nviz
  **

 When I type
 cd /usr/local/src/grass-6.3.0/visualization/nviz
 make
 
 Give me a lot erros, but this errors is because nviz is
 working with tcltk, and I compiled without tcltk. 
 I resolved that compiled with tcltk

ok, it is already fixed in SVN that nviz will only build if Tcl/Tk is
used:
  http://trac.osgeo.org/grass/changeset/31328

but 6.3.0 shipped before that change.

 [...] and python

 ./configure -with-cxx -with-gdal=/usr/bin/gdal-config
 -with-postgres
 -with-postgres-includes=/usr/include/postgresql
 -with-postgres-libs=/usr/lib/postgresql/8.2/lib
 -with-tcltk-includes=/usr/include/tcl8.4 -without-mysql
 -without-odbc -with-readline -with-fftw
 -with-fftw-libs=/usr/local/lib -with-freetype
 --with-freetype-includes=/usr/include/freetype2
 -enable-largefile -with-python
 -with-proj-share=/usr/share/proj


-with-python is not enough to get the new wxPython GUI installed.
That is only required for the new vdigit.

You will need to install wxPython 2.8 and friends.
see grass-6.3.0/gui/wxpython/README 


 But now when I type in the terminal for start grass
 (grass63 -wxpython), give me this error:
  
 ***
 [EMAIL PROTECTED]:~$ grass63 -wxpython
 Cleaning up temporary files.
 Starting GRASS ...
 Traceback (most recent call last):
   File
 /usr/local/grass-6.3.0/etc/wxpython/gis_set.py,
 line 31, in 
 from gui_modules import globalvar
   File
 /usr/local/grass-6.3.0/etc/wxpython/gui_modules/globalvar.py,
 line 48, in 
 CheckForWx()
   File
 /usr/local/grass-6.3.0/etc/wxpython/gui_modules/globalvar.py,
 line 39, in CheckForWx
 except (ImportError, ValueError,
 wxversion.VersionError), e:
 UnboundLocalError: local variable 'wxversion' referenced before
  assignment
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 ***

but the Tcl/Tk GUI works, right? and -text mode?
$ grass63 -tcltk

I think just the wxPython 2.8 packages are missing.

 Thanks Hamish and all list
 
 And sorry for repet the post, but is for answer the
 question to Hamish.

answers are good to have in the archives for others who search for the
same error.
 
 someone has an idea of how I can install grass with new
 wxPython user interface in Ubuntu 7.10?

If you wish to use the new wxGUI I would suggest to download the latest
6.4svn source code snapshot. The GUI has seen a lot of improvements.

  http://grass.osgeo.org/grass64/source/snapshot/


And see grass64.svn/debian/README.debian there for instructions on how
to download Debian packaging rules from DebianGIS and build a .deb for
your version of Ubuntu. (it is almost as simple as dpkg-buildpackage
to create them using the automated scripts)

or if you prefer just compile it yourself as you have been doing.


Hamish



  

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


[GRASS-user] return value of modules?

2008-09-19 Thread Rainer M Krug
Hi

do the modules of R (e.g. r.stats, ...) have return values which I can
evaluate to find out if the execution was successful? E.g. returning
-1 when an error occurred?

I would like to use these return values on error to evaluate the
success of the command when called from R.

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Suggestions for a bit more complex network analysis

2008-09-19 Thread Miha Staut
Dear GRASS-users,

v.net.path is able to compute the nearest path from the starting point to the 
ending point on an network. I would, however, like to find the nearest end 
point (out of an array of end points) on a network from my starting point. Is 
this possible? How?

My final task is to compute the cost distance for each starting point 
(n=486513) to the nearest end point (n=1006). Cost distances should be saved 
along the category of each starting point in a table so that the table would 
have the mentioned 486513 lines at the end. Is this possible? How?

Thanks for your help.
Miha




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


Re[GRASS-user] sampling categorical data with r.resamp.stats

2008-09-19 Thread Jana K.

Hello, 
I want to resample my categorical raster data from higher resolution to
lower, using mode method. Looking at the syntax, I can't figure out where I
tell the command the new resolution. I am confused, as I had expected that
the command would be implemented at the location with crude resolution using
the data from the location with higher resolution as an input, similar as
r.proj, where you specify the input data name, location and mapset. 
Could someone tell me how I tell r.resamp.stats the new - crude resolution? 

Thanks,

Jana
-- 
View this message in context: 
http://www.nabble.com/Resampling-categorical-data-with-r.resamp.stats-tp19569167p19569167.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] return value of modules?

2008-09-19 Thread Hamish
Rainer Krug wrote:
 do the modules of R (e.g. r.stats, ...) have return values
 which I can evaluate to find out if the execution was successful?

Yes. GRASS modules all return 0 on success and 1 on failure.


 I would like to use these return values on error to evaluate the
 success of the command when called from R.

In most cases you can trust that method. Maybe 1% of modules use a
different failure code, if so it's a bug  please report it.


Some/many of the internal C functions will use 1 as success, but they
will typically be called G_is_something() and return a boolean result.
The lib fns return all sorts of things, always check before using them.


Hamish



  

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


Re: [GRASS-user] return value of modules?

2008-09-19 Thread Rainer M Krug
On Fri, Sep 19, 2008 at 11:42 AM, Hamish [EMAIL PROTECTED] wrote:
 Rainer Krug wrote:
 do the modules of R (e.g. r.stats, ...) have return values
 which I can evaluate to find out if the execution was successful?

 Yes. GRASS modules all return 0 on success and 1 on failure.

Good to know - thanks as lot

Rainer



 I would like to use these return values on error to evaluate the
 success of the command when called from R.

 In most cases you can trust that method. Maybe 1% of modules use a
 different failure code, if so it's a bug  please report it.


 Some/many of the internal C functions will use 1 as success, but they
 will typically be called G_is_something() and return a boolean result.
 The lib fns return all sorts of things, always check before using them.


 Hamish









-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: Re[GRASS-user] sampling categorical data with r.resamp.stats

2008-09-19 Thread Glynn Clements

Jana K. wrote:

 I want to resample my categorical raster data from higher resolution to
 lower, using mode method. Looking at the syntax, I can't figure out where I
 tell the command the new resolution. I am confused, as I had expected that
 the command would be implemented at the location with crude resolution using
 the data from the location with higher resolution as an input, similar as
 r.proj, where you specify the input data name, location and mapset. 
 Could someone tell me how I tell r.resamp.stats the new - crude resolution? 

Use g.region.

Resampling modules (r.resample, r.resamp.stats, r.resamp.interp,
r.resamp.rst) resample the map to match the current region.

-- 
Glynn Clements [EMAIL PROTECTED]
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Cell limitation for raster maps; Out of memory

2008-09-19 Thread JHartert

Hello Grass Users!

My question concerns the water modules: r.flow, r.watershed, r.terraflow,...
etc.
But it's also interesting for other modules

The rastermap from which I'm running the analysis modules has the following
r.info:

 |
 |   Type of Map:  raster   Number of Categories: 453   
 |
 |   Data Type:CELL 
 |
 |   Rows: 3996 
 |
 |   Columns:  6936 
 |
 |   Total Cells:  27716256 
 |
 |Projection: Transverse Mercator (zone 0)  
 |
 |N:5380887S:5372895   Res: 2   
 |
 |E:4514163W:4500291   Res: 2   
 |
 |   Range of data:min = 378  max = 453 
 |

-- Error: Out of memory

My question is: Is there a generell limitation of total raster cells?
Because only on raster maps with lower resolution and less than 2000x2000
(4mio) cells
the water-modules and other analysis tools work.

I'm using Grass 6.2.2 on Ubuntu 8.04 (hardy) with 2.6.24-19-server Kernel,
so I can use with this Kernel 8GB Memory. Processor: Dual AMD Opteron
Processor 252 

Thanks a lot for any advices!
Best regards
-- 
View this message in context: 
http://www.nabble.com/Cell-limitation-for-raster-maps--Out-of-memory-tp19570555p19570555.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] readline completion under bash

2008-09-19 Thread Craig Leat
Hi

I'm working on my paper for FOSS4G2008 and was about to say something
about the lack of command completion in GRASS when I remembered seeing
the option --with-readline in the configure script. I can't find
anything on readline (besides the configure option) in the html docs
and I'm left wondering how to get this working under bash. Is readline
completion available in the svn source or do I need an add-on?

Thanks

Craig

Ps A search of the ML archives for readline completion returned zero hits.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] readline completion under bash

2008-09-19 Thread Hamish
Craig Leat wrote:
 I'm working on my paper for FOSS4G2008 and was about to say something
 about the lack of command completion in GRASS

http://grass.osgeo.org/wiki/GRASS_AddOns#Readline_completion
http://www.sorokine.info/grass-complete/
http://grass.osgeo.org/download/addons.php

 when I remembered seeing the option --with-readline in the configure
 script. I can't find anything on readline (besides the configure option)
 in the html docs and I'm left wondering how to get this working under
 bash. Is readline completion available in the svn source

compiled-in readline support is only used with r.mapcalc.

 or do I need an add-on?

as above. I don't know if it will work with GRASS 6, maybe a keen user
might like to update it. tab-completion for mapname and column names
would be cool.

 Ps A search of the ML archives for readline completion returned zero
 hits.

Which search engine? using Gmane's search I found 18 in .user and 19 in
..devel, using the website's google search some are found too.
 http://news.gmane.org/gmane.comp.gis.grass.devel
 http://news.gmane.org/gmane.comp.gis.grass.user


Hamish



  

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


[GRASS-user] Problem converting sites and vectors

2008-09-19 Thread Kurt Springs

Hi folks

I have a small problem.  I am running GRASS 6.3 on OS X 10.5.5.  When  
I started with these maps I was use GRASS 5.0.2.  As things evolved I  
converted them over.  Now one map set is giving me grief.  My sites  
and some vectors haven't been displaying on this map.  I tried  
reconverting my sites to point vectors and got:


v.in.sites [EMAIL PROTECTED] output=wedgetomb8
Default database is not set
Input format: dimension: 2   strings: 1   FP:0

One problem vector area gave this:

v.convert [EMAIL PROTECTED] output=Lake8 endian=big -- 
overwrite --quiet

Vector map Lake8 already exists and will be overwritten
Default database is not set

All my other maps are fine.  There were points when I was trying to  
attach a database to the maps, without success.  So, I am not sure if  
I did anything inadvertently or not.  I just want to fix these so they  
work again.


Also, if this will help diagnose the problem, the point vector file in  
the misbehaving map set have the following files:


coor
head
hist

While the ones that are working have:

cidx
coor
dbln
head
hist
topo

I am planning to use these maps in my ph.d dissertation, and wold like  
all of them working.


Can anyone tell me what is happening and more importantly how to fix it.

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


Re: [GRASS-user] readline completion under bash

2008-09-19 Thread Craig Leat
Hamish wrote:
 http://grass.osgeo.org/wiki/GRASS_AddOns#Readline_completion
 http://www.sorokine.info/grass-complete/
 http://grass.osgeo.org/download/addons.php

 compiled-in readline support is only used with r.mapcalc.

 I don't know if it will work with GRASS 6, maybe a keen user
 might like to update it. tab-completion for mapname and column names
 would be cool.

Alas, it seems grass-complete doesn't work:
GRASS 6.3.1svn (msunduzi_lo31):~/GIS/scripts/grass-complete  . bash/Init.sh
Unable to initialize bash completions: bash is too old or too new:
BASH_VERSION= 3.2.25(1)-release (needed = 2.05)

 Ps A search of the ML archives for readline completion returned zero
 hits.

 Which search engine? using Gmane's search I found 18 in .user and 19 in
 ..devel, using the website's google search some are found too.

http://www.nabble.com/forum/Search.jtp?query=%22readline+completion%22local=yforum=1202daterange=0startdate=enddate=

Now Nabble finds two posts (the above two) :-)

Thanks for the info, I needed to check my facts before announcing that
tapping out long map names in the GRASS console is a pain, especially
when you have to do it three times to combine the rgb bands.

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


RE: [GRASS-user] readline completion under bash

2008-09-19 Thread Patton, Eric
Alas, it seems grass-complete doesn't work:
GRASS 6.3.1svn (msunduzi_lo31):~/GIS/scripts/grass-complete  . bash/Init.sh
Unable to initialize bash completions: bash is too old or too new:
BASH_VERSION= 3.2.25(1)-release (needed = 2.05)

I had contacted the author of Grass completions a few years ago 
to see if he was interested in perhaps updating it to a newer 
version of Bash:

http://article.gmane.org/gmane.comp.gis.grass.user/13851/match=completion

He showed some interest at the time, but I never heard anything further on it.

~ Eric.

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


[GRASS-user] Grass Videos for FOSS4G

2008-09-19 Thread Tim Bowden
I'm looking for content for the OSGeo booth at FOSS4G.  Are there any
grass videos anyone can point me to that I could run along with other
content I have?

Thanks,
Tim Bowden
-- 
Experience is that marvelous thing that enables you recognize a mistake
when you make it again.

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


Re: [GRASS-user] Grass Videos for FOSS4G

2008-09-19 Thread Hamish
Tim Bowden wrote:
 I'm looking for content for the OSGeo booth at FOSS4G. 
 Are there any grass videos anyone can point me to that I could
 run along with other content I have?

there is of course the classic William Shatner narrated promo:
 http://mpa.itc.it/markus/grass_movie_video_CERL/grass_movie_CERL_1987.mov

The GRASS Story [14 minutes, USACERL, 1987] The U.S. Army Corps of
Engineers Construction Engineering Research Laboratory produced this
video to explain basic concepts and potential applications of geographic
information systems to land managers at Army installations. 61mb

21 years later the startup screen is much the same, although a bit less
CRT green. ;) The comment at the site says there is little GRASS content
which delayed me from watching it. I don't think that's true.

also:
 http://www.youtube.com/watch?v=_ZOQSn5tyqQ  (GFOSS.it)
 http://grass.osgeo.org/wiki/Promotional_material
 
http://grass.osgeo.org/wiki/GRASS_Education_%28Free_GIS_education%29#Training_Videos


Hamish



  

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


[GRASS-user] hydrologic modeling

2008-09-19 Thread Edmondo Elisei
Dear All,
I have some truobles (a lot of troubles) with r.water.outlet command.

I've create a drainage map already (with r.watershed).
Trying to create a basin reported to a specific outlet the output map shows
all region by a unique color.

Thanks

regards

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


Re: [GRASS-user] readline completion under bash

2008-09-19 Thread Florian Kindl
On Sep 19 [15:41], Craig Leat wrote:
 Thanks for the info, I needed to check my facts before announcing that
 tapping out long map names in the GRASS console is a pain, especially
 when you have to do it three times to combine the rgb bands.
 
I have a little workaround for that: I put the name of the base dataset
in a temporary variable.
for example:

r=demOfMyRegionVersion2beta_20080919
g.region rast=$r
d.rast $r

Not quite command-line completion, but it saves me some typing.

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


[GRASS-user] v.to.rast shell script

2008-09-19 Thread John C. Tull
I was wondering if anyone could suggest a simple shell script to  
automate the process of running v.to.rast on all layers in a single  
vector in GRASS?


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


Re: [GRASS-user] v.to.rast shell script

2008-09-19 Thread Hamish
John  Tull wrote:
 I was wondering if anyone could suggest a simple shell script to  
 automate the process of running v.to.rast on all layers in
 a single vector in GRASS?

sure, just a bash for loop + g.mlist will do it:

for MAP in `g.mlist vect` ; do
   echo v.to.rast in=$MAP out=`echo $MAP | tr '[:lower:]' '[:upper:]'`
done

in that example the other v.to.rast options would have to be constant of
course.

To avoid mistakes I like to capitalize a map name if it is going to be
both a vector and raster map. Probably there is some simple sed command
to just do the first character. otherwise just use out=$MAP.



Hamish



  

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


Re: [GRASS-user] v.to.rast shell script

2008-09-19 Thread John C. Tull

Hamish:

On Sep 19, 2008, at 6:45 PM, Hamish wrote:


John  Tull wrote:

I was wondering if anyone could suggest a simple shell script to
automate the process of running v.to.rast on all layers in
a single vector in GRASS?


sure, just a bash for loop + g.mlist will do it:

for MAP in `g.mlist vect` ; do
  echo v.to.rast in=$MAP out=`echo $MAP | tr '[:lower:]'  
'[:upper:]'`

done

in that example the other v.to.rast options would have to be  
constant of

course.

To avoid mistakes I like to capitalize a map name if it is going to be
both a vector and raster map. Probably there is some simple sed  
command

to just do the first character. otherwise just use out=$MAP.



Thank you for your quick response. This, with the addition of  
'type=vect' will give me a list of vectors, but I was wanting a list  
of layers within a single vector. I am guessing there might be a way  
to cajole v.info into doing this, but am not sure how at this point.


Thanks,
John

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


Re: [GRASS-user] v.to.rast shell script

2008-09-19 Thread John C. Tull

On Sep 19, 2008, at 7:07 PM, John C. Tull wrote:


Hamish:

On Sep 19, 2008, at 6:45 PM, Hamish wrote:


John  Tull wrote:

I was wondering if anyone could suggest a simple shell script to
automate the process of running v.to.rast on all layers in
a single vector in GRASS?


sure, just a bash for loop + g.mlist will do it:

for MAP in `g.mlist vect` ; do
 echo v.to.rast in=$MAP out=`echo $MAP | tr '[:lower:]'  
'[:upper:]'`

done

in that example the other v.to.rast options would have to be  
constant of

course.

To avoid mistakes I like to capitalize a map name if it is going to  
be
both a vector and raster map. Probably there is some simple sed  
command

to just do the first character. otherwise just use out=$MAP.



Thank you for your quick response. This, with the addition of  
'type=vect' will give me a list of vectors, but I was wanting a list  
of layers within a single vector. I am guessing there might be a way  
to cajole v.info into doing this, but am not sure how at this point.


Thanks,
John




Ok, applying my little grey cells (as Poirot would say) to the problem  
at hand, I believe I have resolved this as follows:


for LAYER in `v.category -g option=report in=vect | awk '{print $1}' |  
uniq` ; do

   v.to.rast in=vect layer=$LAYER out=vect_$LAYER use=val
done

Hamish: thanks for the basis from which to suss the rest.

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