[GRASS-dev] About v.distance,
v.what.vect (wrt "count points within...").
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Fri Aug 13 01:24:56 EDT 2010
On Thursday 12 of August 2010 18:58:39 Moritz Lennert wrote:
> On 12/08/10 16:50, Moritz Lennert wrote:
> > I don't have time right now, but I'll look into adding the index
> > creation into v.db.dropcol, if you confirm that this is the problem.
>
> Committed to grass6_devbranch as rev 43068.
>
> Candidate for 6.4.1.
>
> For grass7, I think the change should be:
>
> --- v.db.dropcolumn.py 2010-08-12 18:48:03.000000000 +0200
> +++ /home/mlennert/v.db.dropcolumn.py 2010-08-12 18:47:29.000000000 +0200
> @@ -102,6 +102,7 @@
> "DROP TABLE ${table}",
> "CREATE TABLE ${table}(${coldef})",
> "INSERT INTO ${table} SELECT ${colnames} FROM ${table}_backup",
> + "CREATE UNIQUE INDEX ${table}_cat ON ${table ( ${keycol} )"
+ "CREATE UNIQUE INDEX ${table}_cat ON ${table ( ${keycol} )" ,
#missing comma?
> "DROP TABLE ${table}_backup",
> "COMMIT"
> ]
>
> But I'll have to update my svn tree first and see if it works, before
> committing anything. If anyone wants to go ahead, please feel free.
Something is wrong... :
--%<---
v.db.dropcolumn pareto_classification_V___pareto_classification_500m_1
column=value
Traceback (most recent call last):
File "/geo/osgeo/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/v.db.dropcolumn", line 123, in <module>
main()
File "/geo/osgeo/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/v.db.dropcolumn", line 110, in main
sql = tmpl.substitute(table = table, coldef = coltypes, colnames =
colnames)
File "/usr/lib/python2.6/string.py", line 172, in substitute
return self.pattern.sub(convert, self.template)
File "/usr/lib/python2.6/string.py", line 162, in convert
val = mapping[named]
KeyError: 'keycol'
-->%---
Nikos
More information about the grass-dev
mailing list