[GRASS-user] v.digit under wxGUI

2009-01-18 Thread Vincent Bain
Hello,

Compiling grass64 on Ubuntu Hardy for 64bit system, I got this error
when running v.digit under wxpython interface :

/usr/local/lib/libgdi.so: undefined symbol: Py_InitModule4

Already pointed in this thread
http://lists.osgeo.org/pipermail/grass-dev/2008-May/037763.html

but I can't catch any solution in the links proposed by Markus.

Does anyone have a solution ? or should I give up on my 64bit
architecture ?

Thank you,
Vincent.

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


[GRASS-user] python3.0 and grass in XP

2009-01-18 Thread Miloslava Sudolska
I am a beginer in the use of Grass. I am using windows native version 
Grass and python.

I need create a program in python with  Grass data.
I installed python3.0 and I do not know import  library gdal.
Can somebody advice me?
Miloslava
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Display thematic vector map - WinGRASS 6.3 (Vista)

2009-01-18 Thread Moritz Lennert

On 15/01/09 17:46, Michael Barton wrote:
Probably the d.vector.thematic script can be copied from 6.4 and run in 
6.3 with little or no modification.


As mentioned in the last mail below, you cannot copy it without 
modifications, as v.db.connect's fs= parameter was introduced in 6.4, 
and I'm not sure that's the only change.


I think the easiest would probably be to copy the lines setting the 
relevant environment variables from 6.4 to 6.3 to replace the d.mon call.


Moritz



Michael
__
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution  Social Change
Center for Social Dynamics  Complexity
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Jan 15, 2009, at 3:27 AM, Moritz Lennert wrote:


On 15/01/09 05:22, Michael Barton wrote:
I'm pretty sure that this is a Vista issue, though one that has been 
solved in 6.4.


And as the OP is using 6.3, he doesn't have access to that solution, 
yet. So, we'll have to wait for the  version of WinGRASS to decide 
whether there might be additional issues in Vista.


Moritz


Michael
On Jan 14, 2009, at 7:33 PM, Matt wrote:

Ken,
You are not alone.  I tried the thematic vector example on page 171 of
Neteler  Mitasova and also encountered the You must open a display
monitor message.  I'm running 6.3.0-4 on Vista.
Matt

On Tue, Jan 6, 2009 at 12:51 PM, Moritz Lennert
mlenn...@club.worldonline.be wrote:

On 06/01/09 17:51, Michael Barton wrote:


Thanks for the correction. WinGRASS supports PNG output, not a 
monitor.
d.vect.thematic was rewritten to use direct rendering through PNG, 
so it

should work on Windows.


This was done in 6.4, so it is not available in winGRASS, yet, 
which is
based on 6.3. Just replacing the script doesn't work, either as it 
use the

fs= parameter of v.db.connect which wasn't introduced until 6.4.

So, another strident call for the a 6.4 winGRASS.

Moritz
___
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] db.select limitation + psql workaround

2009-01-18 Thread Peter Löwe
Thanks for your work, Markus !

Peter
 Original-Nachricht 
 Datum: Sun, 18 Jan 2009 07:23:56 +0100
 Von: Markus Neteler nete...@osgeo.org
 An: Glynn Clements gl...@gclements.plus.com
 CC: GRASS user list grass-user@lists.osgeo.org, Peter Löwe 
 peter.lo...@gmx.de
 Betreff: Re: [GRASS-user] db.select limitation + psql workaround

 On Sat, Jan 17, 2009 at 8:27 PM, Glynn Clements
 gl...@gclements.plus.com wrote:
  Markus Neteler wrote:
 
   I do agree. However, since the statement begins with the
   SELECT-string, db.execute refuses to execute it.
  
   This is a bug in db.execute, and the only simple fix is to remove the
   check altogether.
 
  As simple as this?
 
  Yes.
 
 Done in 7.trunk, devel6 and 6.4.0svn.
 
 Markus

-- 
Dr. Peter Löwe
peter.lo...@gmx.de





Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] generating lines from points

2009-01-18 Thread Paolo Craveri
Martin,
I'm working on a script to create an area from a list of cat (here
attached), useful when we want areas from gps waypoints without direct
editing by users.

This is a very beginner script with not good code (work in
progress);  but handle the problem of connecting  point with category
'1' to point  with category '2' etc.


2009/1/18 Martin Landa landa.mar...@gmail.com:

 If not, do you consider useful something like

 v.edit map tool=addline cats=1,2 layer=1

 or create multiple lines

 v.edit map tool=addline cats=1,2,3,4 layer=1 # line from 1 to 2 and
 line from 3 to 4


It would be great.

 Sure you can always write a simple script and use v.in.ascii approach
 (can be quite slow).

Not quite simple to me!

ciao

-- 
-- 
Paolo C.
Lat. 44° 39' 11.08'' N  Long. 7° 23' 25.26'' E
#!/bin/sh

#
# MODULE:   v.points2area.sh
# AUTHOR(S):craveripaololivio
# PURPOSE:
# COPYRIGHT:(C) 2008 GRASS Development Team/craveripaololivio
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#/

#%Module
#%  description: make area from a list of selected points
#%End

#%option
#% key: input
#% type: string
#% gisprompt: old,vector,vector
#% description: Vector input map
#% key_desc: name
#% required : yes
#%end

#%option
#% key: layer
#% type: integer
#% description: Layer of input map
#% answer: 1
#% required : no
#%end

#%option
#% key: catlist
#% type: string
#% gisprompt: list of points categories
#% key_desc: list
#% description: list of points categories
#% required: yes
#%end

#%option
#% key: output
#% type: string
#% gisprompt: new,vector,vector
#% key_desc: name
#% description: Name for output vector map
#% required: yes
#%end


if [ -z $GISBASE ] ; then
echo You must be in GRASS GIS to run this program. 12
exit 1
fi

if [ $1 != @ARGS_PARSED@ ] ; then
exec g.parser $0 $@
fi

# # test for input vector map
eval `g.findfile element=vector file=$GIS_OPT_INPUT`
if [ ! $file ] ; then
 g.message -e message=Vector map $GIS_OPT_INPUT not found in mapset 
search path
 exit 1
fi
# # does input vector has points ?
if [ $(v.info -t $GIS_OPT_INPUT | grep points | cut -d= -f2) -eq 0 ]; then
 g.message -e message=Input vector map contains no points
 exit 1
fi
# # does layer of input vector map exists ? TODO:
# if [ -z $(v.category  $GIS_OPT_INPUT opt=report | grep -A2 Layer: 
$GIS_OPT_LAYER | grep point) ]; then
#  g.message -e message=Layer $GIS_OPT_LAYER not found in input vector map
#  exit 1
# fi

# what to do in case of user break:
exitprocedure()
{
 g.message -e 'User break!'
 #delete  TMP files:
 g.remove vect=${TMPVECTPOINT},${TMPVECTAREA}  /dev/null
 rm ${TMPFILE}
 exit 1
}
# shell check for user break (signal list: trap -l)
trap exitprocedure 2 3 15

PROGRAM=`basename $0`
set -x
# # # setup temporary file
TMPFILE=$(g.tempfile pid=$$)
if [ $? -ne 0 ] || [ -z $TMPFILE ] ; then
 g.message -e message=unable to create temporary files
 exit 1
fi
# # # setup temporary vector
TMPVECTPOINT=vecttmpextractpoits_$$
TMPVECTAREA=vecttmparea_$$
# # does temporaries file exists already? (What rotten luck!)
if [ -n $(g.mlist vect | sed -n  -e '/'${TMPVECTAREA}'/p' -e 
'/'${TMPVECTPOINT}'/p') ]; then
g.message -e message=What rotten luck!
exit 1
fi

v.extract -t input=${GIS_OPT_INPUT} output=${TMPVECTPOINT} type=point \
layer=${GIS_OPT_LAYER} list=${GIS_OPT_CATLIST} new=-1

if [ ${GIS_OPT_LAYER} -ne 1 ]; then
table=${TMPVECTPOINT}_${GIS_OPT_LAYER}
# # #   se non creo la tabella sul layer 1 ottengo un errore!!
v.db.addtable map=${TMPVECTPOINT} layer=1
else
table=${TMPVECTPOINT}
fi
echo CREATE TABLE $table (cat integer, x double precision, y double 
precision) | db.execute
# v.db.addtable ${TMPVECTPOINT}  col=x double precision, y double precision
v.db.connect map=${TMPVECTPOINT} layer=${GIS_OPT_LAYER} table=$table key=cat
v.to.db ${TMPVECTPOINT} layer=${GIS_OPT_LAYER} option=cat
v.to.db ${TMPVECTPOINT} layer=${GIS_OPT_LAYER} option=coor col=x,y
# # # standard mode. First line
echo VERTI:  ${TMPFILE}
# # # get the first category from list
firstcat=`expr match ${GIS_OPT_CATLIST} '\([0-9]*\)'`
# # # first and last list element are the same
# # # so boundaries can always close correctly
GIS_OPT_CATLIST=${GIS_OPT_CATLIST},${firstcat}
# # # # # populate ascii temp file from points coordinates
# # # # # TODO: better way to do 

[GRASS-user] g.rename wx GUI

2009-01-18 Thread Paolo Craveri
Hi to all!

Just upgrade grass 6.4 from svn.

In wx GUI:

1)add vector  map layer and set some properties
2)display it in map display
3)rename the vector (command line: g.rename vect...)
4)Re-render map in map display
5)get error msg ... Details:
Error: Vector map p...@area not found
6)in Layer Manager -properties -Name of imput vector map set the
new name of vector map
7)try re-render map display: get nothing.
8)To display vector map (which is just  renamed) I have to remove
vector layer from Gis Layer Manager (lost all setting properties) and
re-add.

Is it possible to avoid point 8 (map display refresh with the same
vector with new name)?

ciao




-- 
-- 
Paolo C.
Lat. 44° 39' 11.08'' N  Long. 7° 23' 25.26'' E
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.digit under wxGUI

2009-01-18 Thread Markus Neteler
Vincent,

On Sun, Jan 18, 2009 at 10:35 AM, Vincent Bain b...@toraval.fr wrote:
 Hello,

 Compiling grass64 on Ubuntu Hardy for 64bit system, I got this error
 when running v.digit under wxpython interface :

 /usr/local/lib/libgdi.so: undefined symbol: Py_InitModule4

 Already pointed in this thread
 http://lists.osgeo.org/pipermail/grass-dev/2008-May/037763.html

 but I can't catch any solution in the links proposed by Markus.

 Does anyone have a solution ? or should I give up on my 64bit
 architecture ?

No need to give up on 64bit, I am using it like many others here.

Please post the result of
file /usr/local/lib/libgdi.so

I get
/usr/local/lib/libgdi.so: symbolic link to
`/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so'

As you see it links to the 64bit version of _gdi_.so.

Perhaps you linked the 32bit version?

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


Re: [GRASS-user] v.digit under wxGUI

2009-01-18 Thread Vincent Bain
OK,

so in order to fully enjoy the wxpython GUI on an 64 bit architecture
(especially the wxdigit module) one should first read carefully the
README file located in the your_grass_source_location/gui/wxpython
directory.

The section named 7 - VECTOR DIGITIZER tells you to create a symbolic
link to a wx library : 

sudo ln -s `locate _gdi_.so` /usr/local/lib/libgdi.so

The command locate _gdi_.so may points towards the 32 bit library and
ignore (?) the 64 bit libs path (/usr/lib64/...), so it fails. In my
configuration I had to type :

sudo ln -s /usr/lib64/python2.5/site-packages\
/wx-2.8-gtk2-unicode/wx/_gdi_.so /usr/local/lib/libgdi.so

And it worked !


Le dimanche 18 janvier 2009 à 18:59 +0100, Markus Neteler a écrit :
 Excellent.
 
 Please post a short note to the list so that the next one
 in the trap finds it :)
 
 thanks
 Markus
 
 On Sun, Jan 18, 2009 at 6:21 PM, Vincent Bain b...@toraval.fr wrote:
  Yes !
  you guessed my mistake, the link was pointing to the lib32 lib... Now it
  works fine.
 
  Thank you very much,
 
  Vincent.
 
 
  Le dimanche 18 janvier 2009 à 17:59 +0100, Markus Neteler a écrit :
  Vincent,
 
  On Sun, Jan 18, 2009 at 10:35 AM, Vincent Bain b...@toraval.fr wrote:
   Hello,
  
   Compiling grass64 on Ubuntu Hardy for 64bit system, I got this error
   when running v.digit under wxpython interface :
  
   /usr/local/lib/libgdi.so: undefined symbol: Py_InitModule4
  
   Already pointed in this thread
   http://lists.osgeo.org/pipermail/grass-dev/2008-May/037763.html
  
   but I can't catch any solution in the links proposed by Markus.
  
   Does anyone have a solution ? or should I give up on my 64bit
   architecture ?
 
  No need to give up on 64bit, I am using it like many others here.
 
  Please post the result of
  file /usr/local/lib/libgdi.so
 
  I get
  /usr/local/lib/libgdi.so: symbolic link to
  `/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so'
 
  As you see it links to the 64bit version of _gdi_.so.
 
  Perhaps you linked the 32bit version?
 
  Markus
 
 
 
 
 
 

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


Re: [GRASS-user] python3.0 and grass in XP

2009-01-18 Thread Michael Barton



On Jan 18, 2009, at 4:21 AM, grass-user-requ...@lists.osgeo.org wrote:


Date: Sun, 18 Jan 2009 10:26:48 +0100
From: Miloslava Sudolska sudol...@fpv.umb.sk
Subject: [GRASS-user] python3.0 and grass in XP
To: grass-user@lists.osgeo.org
Message-ID: 4972f5d8.4030...@fpv.umb.sk
Content-Type: text/plain; charset=ISO-8859-2; format=flowed

I am a beginer in the use of Grass. I am using windows native version
Grass and python.
I need create a program in python with  Grass data.
I installed python3.0 and I do not know import  library gdal.
Can somebody advice me?
Miloslava


Miloslava,

The GRASS wxpython GUI is not compatible with Python 3. It uses 2.5  
and probably works with 2.6 (though I haven't tested it). Python 3 is  
not backward compatible with Python 2.x.


Michael

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


Re: [GRASS-user] g.rename wx GUI

2009-01-18 Thread Michael Barton



On Jan 18, 2009, at 10:00 AM, grass-user-requ...@lists.osgeo.org  
wrote:



Date: Sun, 18 Jan 2009 17:52:13 +0100
From: Paolo Craveri pcrav...@gmail.com
Subject: [GRASS-user] g.rename  wx GUI
To: GRASS users list grass-user@lists.osgeo.org
Message-ID:
1ea7fb790901180852o6296c476w15ab0c3d8a6e5...@mail.gmail.com
Content-Type: text/plain; charset=UTF-8

Hi to all!

Just upgrade grass 6.4 from svn.

In wx GUI:

1)add vector  map layer and set some properties
2)display it in map display
3)rename the vector (command line: g.rename vect...)
4)Re-render map in map display
5)get error msg ... Details:
Error: Vector map p...@area not found
6)in Layer Manager -properties -Name of imput vector map set the
new name of vector map
7)try re-render map display: get nothing.
8)To display vector map (which is just  renamed) I have to remove
vector layer from Gis Layer Manager (lost all setting properties) and
re-add.

Is it possible to avoid point 8 (map display refresh with the same
vector with new name)?


This is a user error, not a problem with the GUI. The GUI is behaving  
correctly. While it would be nice to make the GUI sufficiently robust  
to deal with such user errors, but I'm not sure how. You have told the  
rendering system to display a map of a particular name. Then you  
changed the name of the map. Lacking cyberpsychic abilities, is no way  
for the rendering system to know the new name of the map unless you  
tell it. So when it tries to render a map that no longer exists, it  
correctly gives an error message that the map doesn't exist.


Michael

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


Re: [GRASS-user] g.rename wx GUI

2009-01-18 Thread Martin Landa
Hi,

2009/1/18 Michael Barton michael.bar...@asu.edu:
 On Jan 18, 2009, at 10:00 AM, grass-user-requ...@lists.osgeo.org wrote:
 6)in Layer Manager -properties -Name of imput vector map set the
 new name of vector map
 7)try re-render map display: get nothing.
 8)To display vector map (which is just  renamed) I have to remove
 vector layer from Gis Layer Manager (lost all setting properties) and
 re-add.

 Is it possible to avoid point 8 (map display refresh with the same
 vector with new name)?

 This is a user error, not a problem with the GUI. The GUI is behaving
 correctly. While it would be nice to make the GUI sufficiently robust to
 deal with such user errors, but I'm not sure how. You have told the
 rendering system to display a map of a particular name. Then you changed the
 name of the map. Lacking cyberpsychic abilities, is no way for the rendering
 system to know the new name of the map unless you tell it. So when it tries
 to render a map that no longer exists, it correctly gives an error message
 that the map doesn't exist.

that's right, but Paulo reported something else,

 6)in Layer Manager -properties -Name of imput vector map set the
 new name of vector map
 7)try re-render map display: get nothing.

- here the map layer should have been rendered again. Now fixed in
all active branches.

Martin

-- 
Martin Landa landa.martin gmail.com * http://gama.fsv.cvut.cz/~landa *
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] g.rename wx GUI

2009-01-18 Thread Michael Barton


On Jan 18, 2009, at 2:14 PM, Martin Landa wrote:


Hi,

2009/1/18 Michael Barton michael.bar...@asu.edu:
On Jan 18, 2009, at 10:00 AM, grass-user-requ...@lists.osgeo.org  
wrote:

6)in Layer Manager -properties -Name of imput vector map set the
new name of vector map
7)try re-render map display: get nothing.
8)To display vector map (which is just  renamed) I have to remove
vector layer from Gis Layer Manager (lost all setting properties)  
and

re-add.

Is it possible to avoid point 8 (map display refresh with the same
vector with new name)?


This is a user error, not a problem with the GUI. The GUI is behaving
correctly. While it would be nice to make the GUI sufficiently  
robust to

deal with such user errors, but I'm not sure how. You have told the
rendering system to display a map of a particular name. Then you  
changed the
name of the map. Lacking cyberpsychic abilities, is no way for the  
rendering
system to know the new name of the map unless you tell it. So when  
it tries
to render a map that no longer exists, it correctly gives an error  
message

that the map doesn't exist.


that's right, but Paulo reported something else,


6)in Layer Manager -properties -Name of imput vector map set the
new name of vector map
7)try re-render map display: get nothing.


- here the map layer should have been rendered again. Now fixed in
all active branches.



Thanks. My mistake for reading too fast.

Michael

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


[GRASS-user] Landsat classification with CORINE CLC color codes?

2009-01-18 Thread Dimos
Hello,

My apologies if this question is already covered in this list...

44 CORINE CLC RGB  color codes are mentioned for each of the 44 land use
classes at:
http://dataservice.eea.europa.eu/download.asp?id=14234filetype=.csv

Can we classify a Landsat RGB image based on these rgb color codes in
GRASS GIS and how? 

Cheers, Dimos




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


Re: [GRASS-user] v.digit under wxGUI

2009-01-18 Thread Markus Neteler
On Sun, Jan 18, 2009 at 7:30 PM, Vincent Bain b...@toraval.fr wrote:
 OK,

 so in order to fully enjoy the wxpython GUI on an 64 bit architecture
 (especially the wxdigit module) one should first read carefully the
 README file located in the your_grass_source_location/gui/wxpython
 directory.

 The section named 7 - VECTOR DIGITIZER tells you to create a symbolic
 link to a wx library :

sudo ln -s `locate _gdi_.so` /usr/local/lib/libgdi.so

 The command locate _gdi_.so may points towards the 32 bit library and
 ignore (?) the 64 bit libs path (/usr/lib64/...), so it fails.

Ouch, you are right! I have a pure 64bit box here...

 In my configuration I had to type :

sudo ln -s /usr/lib64/python2.5/site-packages\
/wx-2.8-gtk2-unicode/wx/_gdi_.so /usr/local/lib/libgdi.so

 And it worked !

It needs to be conditionalized upon
$HOSTTYPE

Here:
echo  $HOSTTYPE
x86_64

I'll update the README accordingly.

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