Solved! (was Re: [GRASS-user] v.dissolve - is this a bug?)
rchirgwin at ozemail.com.au
Thu Sep 16 00:51:11 EDT 2010
In case anyone's wondering, I found out what happens.
The issue is the handling of case by the OSX command line. Most of the
time, the OSX command line ignores case. For example:
v.clean MyMap output=CleanMap option=break,snap
works the same as:
v.clean mymap output=cleanmap option=break,snap
The only difference is that the output file name is cased - but a
case-less input of a cased name works.
However, database handling is sometimes case-sensitive. If I create the
column using v.db.addcol:
v.db.addcol MyMap columns="Dissolve int"
then these will behave the same:
v.db.update MyMap column=dissolve value=1
v.db.update MyMap column=Dissolve value=1
However, v.dissolve will notice the difference!
v.dissolve MyMap output=MyMap_Dissolved column=Dissolve -- works
v.dissolve MyMap output=MyMap_Dissolved column=dissolve
ERROR: Key column must be of type integer or string
I would file this in the tracker, but there's nobody around to reset my
So: in using v.dissolve, beware of case.
On 16/08/10 6:08 PM, Markus Neteler wrote:
> On Sat, Aug 14, 2010 at 10:16 AM, Richard Chirgwin
> <rchirgwin at ozemail.com.au> wrote:
>> In running v.dissolve within a script, I am getting an intermittent failure:
>> ERROR: key column must be integer or string
>> Here's the script spot that fails (but only sometimes)
>> v.db.addtable MAP
>> v.db.addcol MAP columns="Dissolve int"
> At this point, please run
> v.info -c MAP
> and report here.
>> v.db.update MAP column=Dissolve value=1
>> v.dissolve MAP output=DISSOLVE column=Dissolve
>> The killer is that it isn't reliable - sometimes it works, sometimes it
>> fails, and I can't tell why!
> Always on the same machine, the same binary and the same map?
More information about the grass-user