[GRASS-dev] [GRASS-user] v.rast.stats ERROR
Stefan.Blumentrath at nina.no
Fri Oct 21 01:11:29 PDT 2016
Yes, but in vector maps starting with a number or having a "." in the name is not allowed. Also SQL keywords are excluded...
So, the same logic may be used to check column names (I guess that is what Markus intended).
However, it seems that for raster maps more special characters are legal and also v.in.ogr uses layer names from the original data source which can cause conflicts in SQL DB backends...
Maybe legal file names, column and table handling is something to re-consider for GRASS 8?
From: grass-dev [mailto:grass-dev-bounces at lists.osgeo.org] On Behalf Of Moritz Lennert
Sent: 21. oktober 2016 09:34
To: Markus Neteler <neteler at osgeo.org>; GRASS developers list <grass-dev at lists.osgeo.org>
Subject: Re: [GRASS-dev] [GRASS-user] v.rast.stats ERROR
On 20/10/16 22:11, Markus Neteler wrote:
> (moved to GRASS-dev)
> Topic: v.rast.stats error message
> On Fri, Oct 14, 2016 at 8:35 PM, Helmut Kudrnovsky <hellik at web.de> wrote:
>>> ERROR: Unable to add column <1_average DOUBLE PRECISION>.
>>> ERROR: Adding columns failed. Exiting.
>> AFAIR in SQL column names starting with a number isn't allowed.
> Is there any Python wrapper around Vect_legal_filename() which could
> be used here to generate a better error message?
Even though a Python wrapper for Vect_legal_filename would be useful, it wouldn't help here as the problem is the attribute column name, not the filename.
grass-dev mailing list
grass-dev at lists.osgeo.org
More information about the grass-dev