Re: [GRASS-user] Why v.extract produces columns of type CHARACTER?
On Wed, Jan 14, 2009 at 4:59 AM, Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de wrote: The columns produces by v.extract are of type CHARACTER and v.dissolve does not like this. It's an old issue. Just for the record: Fixed today (it liked it already unless and empty char field was found which was fixed by Moritz today in the DBF driver). Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Why v.extract produces columns of type CHARACTER?
Nikos Alexandris wrote: The columns produces by v.extract are of type CHARACTER and v.dissolve does not like this. It's an old issue. Can someone explain why it becomes CHARACTER since grass' type for strings is varchar? Regards, Nikos Sorry, wrong question - false alarm. Actually, the *real* question I have asked in the past but never really got a reply is: why sqlitebrowser reports the columns as varchar while db.describe reports (in grass-shell) the same columns to be of type CHARACTER? GRASS' DBMI doesn't distinguish CHARACTER from CHARACTER VARYING (aka VARCHAR); the constant DB_SQL_TYPE_CHARACTER is used for both (although there is also DB_SQL_TYPE_TEXT for TEXT). Also, SQLite doesn't really have column types; it assigns types to individual values rather than to columns. Columns may have a type of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB or SQLITE_NULL, but it doesn't actually require that the values' types conform to the type. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Why v.extract produces columns of type CHARACTER?
On Wed, Jan 14, 2009 at 5:02 PM, Glynn Clements gl...@gclements.plus.com wrote: Nikos Alexandris wrote: The columns produces by v.extract are of type CHARACTER and v.dissolve does not like this. It's an old issue. Can someone explain why it becomes CHARACTER since grass' type for strings is varchar? Regards, Nikos Sorry, wrong question - false alarm. Actually, the *real* question I have asked in the past but never really got a reply is: why sqlitebrowser reports the columns as varchar while db.describe reports (in grass-shell) the same columns to be of type CHARACTER? GRASS' DBMI doesn't distinguish CHARACTER from CHARACTER VARYING (aka VARCHAR); the constant DB_SQL_TYPE_CHARACTER is used for both (although there is also DB_SQL_TYPE_TEXT for TEXT). Also, SQLite doesn't really have column types; it assigns types to individual values rather than to columns. Columns may have a type of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB or SQLITE_NULL, but it doesn't actually require that the values' types conform to the type. A bit off-topic. Does this mean I can actually edit vector data attributes as text even if the column is an INTEGER? I'm using Sqlite database browser for editing. A bit dangerous for me. Any other way to add checks/controls for editing mistakes? -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- cheers, maning -- Freedom is still the most radical idea of all -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Why v.extract produces columns of type CHARACTER?
On 14/01/09 10:19, maning sambale wrote: On Wed, Jan 14, 2009 at 5:02 PM, Glynn Clements gl...@gclements.plus.com wrote: Nikos Alexandris wrote: The columns produces by v.extract are of type CHARACTER and v.dissolve does not like this. It's an old issue. Can someone explain why it becomes CHARACTER since grass' type for strings is varchar? Regards, Nikos Sorry, wrong question - false alarm. Actually, the *real* question I have asked in the past but never really got a reply is: why sqlitebrowser reports the columns as varchar while db.describe reports (in grass-shell) the same columns to be of type CHARACTER? GRASS' DBMI doesn't distinguish CHARACTER from CHARACTER VARYING (aka VARCHAR); the constant DB_SQL_TYPE_CHARACTER is used for both (although there is also DB_SQL_TYPE_TEXT for TEXT). Also, SQLite doesn't really have column types; it assigns types to individual values rather than to columns. Columns may have a type of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB or SQLITE_NULL, AFAIK, columns can have any type, even ones invented by you. I.e. create table test (key int, chartest ThisIsMyTextType); works in sqlite, where works means that sqlite just ignores the column type and automatically affects a type amongst the ones listed by Glynn to each value. but it doesn't actually require that the values' types conform to the type. A bit off-topic. Does this mean I can actually edit vector data attributes as text even if the column is an INTEGER? I'm using Sqlite database browser for editing. A bit dangerous for me. Yes. I find SQLite a bit dangerous because of that, especially since GRASS enforces types. Any other way to add checks/controls for editing mistakes? IMHO, the best way to deal with attributes in GRASS + SQLite is to do it via the built-in tools in GRASS, and not via the SQLiteBrowser or other tools as this can lead to incompatibilities and confusion. The new wxgui has a very nice interface for attribute and table management. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Why v.extract produces columns of type CHARACTER?
IMHO, the best way to deal with attributes in GRASS + SQLite is to do it via the built-in tools in GRASS, and not via the SQLiteBrowser or other tools as this can lead to incompatibilities and confusion. The new wxgui has a very nice interface for attribute and table management. Ahh! Thanks for the tip. I haven't really used GRASS GUI apart from the quick d.mon, d.vect, d.rast. I guess now is the time to tryout wxgui. -- cheers, maning -- Freedom is still the most radical idea of all -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user