On 03/12/2010 16:01, Micha Silver wrote:
On 12/03/2010 09:53 AM, Patrick_schirmer wrote:
Thanks Micha,
Yes, commands are what I typed, just renamed the filenames
before
sending mail to the list:
x_arbeit = x_last
x_wohn = x_current
That syntax is an
error in postgres: double precision does not take a length
qualifier.
There's nothing in the v.db.join script that I can find that
would add
such a thing."
Is it a problem of postgres or of v.db.addcolumn which is called
within
v.db.join? Can someone reproduce this mistake?
Well, postgresql doesn't accept a length qualifier for the type
"double
precision". But the grass module v.db.addcol doesn't add any
qualifier
either. So I can't see where the error is originating from.
Would you mind to post the output of:
v.info -c
v.db.connect -p
for each of the point vectors?
Maybe that will give us some hint...
And one more test, please:
db.describe table=<your vector points map>
Cheers, Patrick
On 12/01/2010 08:48 PM, Micha Silver wrote:
Hi Patrick
On 12/01/2010 05:29 PM, Patrick_schirmer wrote:
Hi, me again :-/
I got two vectorfiles with points - one file representing
the current
location of persons and the other one representing previous
locations
of the same persons. Persons are unique and have an id which
is present
in both files. I would like to calculate the distance each
person has
moved. Thought it would be best doing this in the datbase.
my approach:
v.db.addcolumn map=GR_xy_current col="x_current double
precision,
y_current double precision, distance double precision"
v.db.addcolumn map=GR_xy_last col="x_last double precision,
y_last
double precision"
v.to.db map=GR_xy_current option=coor
col=x_current,y_current
v.to.db map=GR_xy_last option=coor col=x_last,y_last
v.db.join map=GR_xy_current column=id otable=GR_xy_last
ocolumn=id
All commands will run except the last one, creating this
error:
DBMI-Postgres driver error:
Cannot execute:
ALTER TABLE GR_xy_current ADD COLUMN x_arbeit DOUBLE
PRECISION(8)
ERROR: syntax error at or near "("
LINE 1: ... TABLE GR_xy_current ADD COLUMN x_arbeit DOUBLE
PRECISION(8)
^
ERROR: Error
while executing: 'ALTER TABLE GR_xy_current ADD COLUMN
x_last
DOUBLE PRECISION(8)'
ERROR: Unable to add column <x_last DOUBLE
PRECISION(8)>.
ERROR: Error creating column <x_last>.
datbase: PG; Grass-version 7.0
This mail was received via Mail-SeCure System.
--
Micha Silver
Arava Development Co. +972-52-3665918
http://www.surfaces.co.il
This mail was received via Mail-SeCure System.
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-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
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user