[GRASS-user] v.digit

Hello,
I try v.digit; i want to define a new outline. When i want to close the outline, it opens a window form: attributes; new record was created. Assume data encoding as: [choice between utf-8,ascii,iso88859-1,koi8-t]; i do submit and i have the error:

Cannot update table:
DBMI-DBF driver error:
SQL parser error in statement:
update australia set where cat = 4
Error in db_execute_immediate()

Could you help me?
Thank you

On Thu, 2009-02-19 at 17:28 +0100, FAROUX STEPHANIE wrote:

Hello,
I try v.digit; i want to define a new outline. When i want to close the
outline, it opens a window form: attributes; new record was created.
Assume data encoding as: [choice between utf-8,ascii,iso88859-1,koi8-t];
i do submit and i have the error:

Cannot update table:
DBMI-DBF driver error:
SQL parser error in statement:
update australia set where cat = 4
Error in db_execute_immediate()

Could you help me?
Thank you

First things to try:

db.connect -p
v.db.connect -g YourVectorMap

Nikos

Nikos Alexandris wrote:

On Thu, 2009-02-19 at 17:28 +0100, FAROUX STEPHANIE wrote:
  

Hello,
I try v.digit; i want to define a new outline. When i want to close the outline, it opens a window form: attributes; new record was created. Assume data encoding as: [choice between utf-8,ascii,iso88859-1,koi8-t]; i do submit and i have the error:

Cannot update table:
DBMI-DBF driver error:
SQL parser error in statement:
update australia set where cat = 4
Error in db_execute_immediate()

Could you help me?
Thank you
    
First things to try:

db.connect -p
v.db.connect -g YourVectorMap

Nikos

Yes i forgot to connect but it isn't enough to work...

I also try db.tables but i have the error:

DBMI-DBF driver error:
Cannot open dbf database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia.dbf

FAROUX STEPHANIE:

>> Hello,
>> I try v.digit; i want to define a new outline. When i want to close the
>> outline, it opens a window form: attributes; new record was created.
>> Assume data encoding as: [choice between utf-8,ascii,iso88859-1,koi8-t];
>> i do submit and i have the error:
>>
>> Cannot update table:
>> DBMI-DBF driver error:
>> SQL parser error in statement:
>> update australia set where cat = 4
>> Error in db_execute_immediate()
     
> First things to try:
>
> db.connect -p
> v.db.connect -g YourVectorMap
   
Yes i forgot to connect but it isn't enough to work...
I also try db.tables but i have the error:

DBMI-DBF driver error:
Cannot open dbf database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia.dbf

Is the table in the database already present?

# check with
db.tables -p

# if not, then
v.db.addtable YourVectorMap

# if it is... then (shrug)

On Thu, 2009-02-19 at 17:56 +0100, Nikos Alexandris wrote:

FAROUX STEPHANIE:
> >> Hello,
> >> I try v.digit; i want to define a new outline. When i want to close the
> >> outline, it opens a window form: attributes; new record was created.
> >> Assume data encoding as: [choice between utf-8,ascii,iso88859-1,koi8-t];
> >> i do submit and i have the error:
> >>
> >> Cannot update table:
> >> DBMI-DBF driver error:
> >> SQL parser error in statement:
> >> update australia set where cat = 4
> >> Error in db_execute_immediate()
     
> > First things to try:
> >
> > db.connect -p
> > v.db.connect -g YourVectorMap
   
> Yes i forgot to connect but it isn't enough to work...
> I also try db.tables but i have the error:
>
> DBMI-DBF driver error:
> Cannot open dbf database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia.dbf

Ah, ok! Sorry...

What exactly does db.tables -p say?
Did you move the (grass-)database to another directory from last time
you worked in this location?

[...]

Yes i forgot to connect but it isn't enough to work...

And... what exactly does db.connect -p say?

Nikos Alexandris wrote:

[...]
  

Yes i forgot to connect but it isn't enough to work...
    
And... what exactly does db.connect -p say?

driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia2.dbf
schema:(null)
group:toto

I destroyed my vector layer and tried to make a new one...
Is there a place in the documentation where this action is described? For the moment i have no database in the dbf directory. I don't remember how i get one before (i had the database before i destroy my vector)

On Thu, 2009-02-19 at 18:14 +0100, FAROUX STEPHANIE wrote:

Nikos Alexandris wrote:
> [...]
>
>> Yes i forgot to connect but it isn't enough to work...
>>
>
> And... what exactly does db.connect -p say?
>
>
>

driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia2.dbf
schema:(null)
group:toto

I destroyed my vector layer and tried to make a new one...
Is there a place in the documentation where this action is described?
For the moment i have no database in the dbf directory. I don't remember
how i get one before (i had the database before i destroy my vector)

If you still have the initial database then you just need to re-connect
to it. _If_ I am guessing right (right now, from memory) you have to
execute something like:

v.db.reconnect.all old_database=
$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia.dbf
new_database=database:
$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia2.dbf

Hopefully this helps. If not then I will try to have a more precise look
at it later, or a grass-db magician on the list can solve this out.

Kind regards, Nikos

Hi,

2009/2/19 FAROUX STEPHANIE <stephanie.faroux@meteo.fr>:

[...]

group:toto

What is group 'toto'?

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Martin Landa wrote:

Hi,

2009/2/19 FAROUX STEPHANIE <stephanie.faroux@meteo.fr>:

[...]

group:toto
    
What is group 'toto'?

Martin

nothing

On Thu, Feb 19, 2009 at 6:14 PM, FAROUX STEPHANIE
<stephanie.faroux@meteo.fr> wrote:

Nikos Alexandris wrote:

And... what exactly does db.connect -p say?

driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia2.dbf
schema:(null)
group:toto

Please don't define a file name as database. It must be the *directory*:

db.connect -p
driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
schema:
group:

Then it will work. So:
db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
db.tables -p

Markus

On Thu, 2009-02-19 at 21:08 +0100, Markus Neteler wrote:

On Thu, Feb 19, 2009 at 6:14 PM, FAROUX STEPHANIE
<stephanie.faroux@meteo.fr> wrote:
> Nikos Alexandris wrote:
>>
>> And... what exactly does db.connect -p say?
>
> driver:dbf
> database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia2.dbf
> schema:(null)
> group:toto

Please don't define a file name as database. It must be the *directory*:

db.connect -p
driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
schema:
group:

Then it will work. So:
db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
db.tables -p

Markus

Right. I was writing from memory.

stephanie.faroux wrote:

i do submit and i have the error:

Cannot update table:
DBMI-DBF driver error:
SQL parser error in statement:
update australia set where cat = 4
Error in db_execute_immediate()

"update australia set where cat = 4" is missing something between "set"
and "where". set what?

Hamish

Hamish wrote:

stephanie.faroux wrote:
  

i do submit and i have the error:

Cannot update table:
DBMI-DBF driver error:
SQL parser error in statement:
update australia set where cat = 4
Error in db_execute_immediate()
    
"update australia set where cat = 4" is missing something between "set"
and "where". set what?

Hamish

Yes i know it isn't right. I will see this problem next. For the moment grass fails to run... :frowning:

Markus Neteler wrote:

On Thu, Feb 19, 2009 at 6:14 PM, FAROUX STEPHANIE
<stephanie.faroux@meteo.fr> wrote:
  

Nikos Alexandris wrote:
    

And... what exactly does db.connect -p say?
      

driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/australia2.dbf
schema:(null)
group:toto
    
Please don't define a file name as database. It must be the *directory*:

db.connect -p
driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
schema:
group:

Then it will work. So:
db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
db.tables -p

Markus

Ok it works; now i have a little problem: i try to make a outline and i have difficulty to close it. My map is global at 1/120° resolution; maybe it's linked to the big distances?
I changed the threshold in the settings but it doesn't seem to be enough....
Thank you

Cannot update table:

>> DBMI-DBF driver error:
>> SQL parser error in statement:
>> update australia set where cat = 4
>> Error in db_execute_immediate()

when i want to save a new vector. But the vector is created.

Stephanie:

now i have a little problem: i try to make a outline and i
have difficulty to close it. My map is global at 1/120° resolution;
maybe it's linked to the big distances?
I changed the threshold in the settings but it doesn't seem to be enough....

What kind of settings? "g.region -p"?

If you need a _frame_ (=vector) you can use "v.in.region" and for a grid
"v.mkgrid".

Nikos

Nikos Alexandris wrote:

Stephanie:
  

now i have a little problem: i try to make a outline and i have difficulty to close it. My map is global at 1/120° resolution; maybe it's linked to the big distances?
I changed the threshold in the settings but it doesn't seem to be enough....
    
What kind of settings? "g.region -p"?

If you need a _frame_ (=vector) you can use "v.in.region" and for a grid
"v.mkgrid".

Nikos

Nono i try to make a outline vector and i talk about the settings of the v.digit function

On 20/02/09 11:14, FAROUX STEPHANIE wrote:

Ok it works; now i have a little problem: i try to make a outline and i have difficulty to close it. My map is global at 1/120° resolution; maybe it's linked to the big distances?
I changed the threshold in the settings but it doesn't seem to be enough....

Snapping has never worked correctly for me in the gis.m digitizer. Work-around is to draw the boundaries and then move one of the nodes which you want to snap to the other. Sometimes, you have to move it away a bit before moving it back towards the other node, and then snapping works.

It works very well in the new wxGUI, which I would generally recommend as being superior to the old digitizer.

Moritz