Re: [GRASS-user] db.select driver issue

2010-03-28 Thread Vincent Bain
Richard, FYI the problem may be located at the driver level: with 'pg'
driver this query works fine.

Bye,
Vincent



Le dimanche 28 mars 2010 à 08:54 +1100, Richard Chirgwin a écrit :
 In a previous thread, I mentioned trouble with Grass-GIS's database 
 driver on complex queries, but couldn't remember an example.
 
 I've bumped into one this morning. In MySQL, this query works fine:
 
 select sum(population) from australia
 
 in Grass-GIS:
 
 echo select sum(population) from Australia | db.select -c
 
 returns:
 
  DBMI-DBF driver error:
  SQL parser error: syntax error, unexpected '(', expecting FROM 
  processing '('
  in statement:
  select sum(population) from Australia
 
  Error in db_open_select_cursor()
 Richard
 ___
 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: [Qgis-user] GRASS permission issue

2010-03-28 Thread Micha Silver

On 03/28/2010 12:49 PM, Jeremy G wrote:

Hi,

(It was a post on the QGIS-user mailing list only)

2010/3/24 Jeremy G jeremy@gmail.com mailto:jeremy@gmail.com


It looks like I'm not authorised to work on any MAPSET I created
(through the QGIS plugin).


Here are a couple of screenshots of the issue through grass without 
qgis : the first one (1) is the terminal window,  the second one (2) 
is the introduction window of Grass. I can't create neither open any 
Mapset...


Where exactly is the /media/Docs/geodata directory located on your 
machine/network?
You have to be the *owner* of the directory containing the Location and 
Mapset.



Thanks for the help,

Jeremy

(1) http://geographiques.org/img/grass_terminal.png
(2) http://geographiques.org/img/grass_permission.png


This mail was received via Mail-SeCure System.


___
Qgis-user mailing list
qgis-u...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

This mail was received via Mail-SeCure System.


   



--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918

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


[GRASS-user] Re: [Qgis-user] GRASS permission issue

2010-03-28 Thread Micha Silver




On 28/03/2010 14:09, Jeremy G wrote:

  
Micha,
  
  2010/3/28 Micha Silver mi...@arava.co.il
  

 

Where exactly is the /media/Docs/geodata directory located on your
machine/network?
You have to be the *owner* of the directory containing the Location and
Mapset.


  
  
/media/Docs is a automatically mounted partition every time i startup
the computer. Do you know how I can check if I'm fully authorized on it
? I don't remember any similar issue with it but it could be related.
  
  
  

Probably checking:
 ls -al /media/Docs 
will give you an idea.  What OS are you on? How is the partition
mounted (i.e. what's in the /etc/fstab)? Is it a samba/cifs share or
nfs? 
GRASS, unlike other apps, still checks if your are the owner of the
mapset. 


  
  Jeremy
  
  
  


  
  
  
(1) http://geographiques.org/img/grass_terminal.png
(2) http://geographiques.org/img/grass_permission.png
  
  
  


  
  
  
This mail was received via Mail-SeCure System.



-- 
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918



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


[GRASS-user] Re: [Qgis-user] GRASS permission issue

2010-03-28 Thread Micha Silver

On 03/28/2010 03:04 PM, Jeremy G wrote:

2010/3/28 Micha Silver mi...@arava.co.il mailto:mi...@arava.co.il

Probably checking:
 ls -al /media/Docs


Here is the result (I didn't paste the whole directory information) :

jer...@jeremy:~$  ls -al /media/Docs
drwxrwx--- 1 root plugdev8192 2010-03-25 16:34 .
drwxr-xr-x 9 root root   4096 2010-03-28 12:37 ..
drwxrwx--- 1 root plugdev4096 2010-03-11 21:33 geodata

OK, the owner of geodata is root (I assume that's not your username).


After verification I'm listed on the group plugdev.

 What OS are you on?


Running Ubuntu 9.10 with GRASS 6.4.0RC5.

How is the partition mounted (i.e. what's in the /etc/fstab)? Is
it a samba/cifs share or nfs?


This is the line about /media/Docs in /etc/fstab :
UUID=16A82CDCA82CBBDD /media/Docs ntfs
defaults,nls=utf8,umask=007,gid=46 0   0



Try adding here uid=your username as an additional option. Something like:
 UUID=16A82CDCA82CBBDD /media/Docs ntfs
defaults,nls=utf8,umask=007,gid=46,uid=jeremy 0   0


Then do a:
sudo mount -o remount /media/Docs
Now check ls -al /media/Docs/geodata/TESTS/grass
If you appear as the owner instead of root, then GRASS should startup OK.

If you want to try this out on the fly without changing your fstab, 
then you can:
First check which disk (/dev/hdx or /dev/sdx where x might be 1,2,3...) 
is your ntfs partition with sudo fdisk -l, then...

sudo umount /media/Docs
sudo mount -o defaults,umask=0007,gid=46,uid=jeremy /dev/hdx /media/Docs
and check as above.

Let us know how it goes,
--
Micha

Thank you for trying to help me to fix that,

Jeremy

This mail was received via Mail-SeCure System.



--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918

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


Re: [GRASS-user] db.select driver issue

2010-03-28 Thread Richard Chirgwin

Micha Silver wrote:

On 03/28/2010 11:08 AM, Vincent Bain wrote:

Richard, FYI the problem may be located at the driver level: with 'pg'
driver this query works fine.

Bye,
Vincent



Le dimanche 28 mars 2010 à 08:54 +1100, Richard Chirgwin a écrit :
  

In a previous thread, I mentioned trouble with Grass-GIS's database
driver on complex queries, but couldn't remember an example.

I've bumped into one this morning. In MySQL, this query works fine:

select sum(population) from australia

in Grass-GIS:

echo select sum(population) from Australia | db.select -c

returns:



DBMI-DBF driver error:
   

So is it a dbf driver or mysql?
db.connect -p??
Whack. I think the cluestick just hit me. I will double-check the 
connection and try again ...


RC



SQL parser error: syntax error, unexpected '(', expecting FROM
processing '('
in statement:
select sum(population) from Australia

Error in db_open_select_cursor()
   

Richard
___
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

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


Re: [GRASS-user] r.le or r.li?

2010-03-28 Thread maning sambale
 That's right.
 The differences: r.le is the first implementation but unmaintained.
 r.li is a new implementation and somewhat maintained (just fixed
 a bug today). Hopefully more indices are added in future.
Thanks for clarifying. So r.li it is.

 Follow up inquiry, how do I include the the patch stats to a vector
 polygon?  For example, I have a watershed polygon and landcover
 raster.  I want to include as an attribute, the largest interior patch
 within each sub-basin.

 ... sorry, no idea. In any case think raster for this module family...

That's my line of thinking at the moment.



-- 
cheers,
maning
--
Freedom is still the most radical idea of all -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
--
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user