[GRASSLIST:5291] grass and geology

Hi,

I am a new grass user and I would like to know if it is possible to use grass
to deal with geological data, i.e. plane orientations, lineations...
Has someone already done that kind of things and would be ready to share his
experience?

By the way I am having some troubles while importing shapfiles with v.in.ogr,
when I run the command:

v.in.ogr dsn=/home/vincent/Longmen_Shan-data/Geologie/geologic_age.shp
output=geologie layer=geologic_age min_area=0.0001 snap=0.001 -o

I am getting the following error message:

DBMI-DBF driver error:
Column 'GLG' already exists (duplicate name)
Cannot create table.
Error in db_execute_immediate()

ERROR: Cannot create table: create table geologie (cat integer, AREA double
       precision, GLG varchar ( 5 ), GLG varchar ( 5 ), DESCRIPTIO varchar
( 32 ))

It seems that there is a problem with my .dbf file but I don't know what.

Thanks in advance,

Vincent.

--
Vincent Godard
Equipe de géodynamique
Laboratoire de Géologie
Ecole Normale Supérieure
24, Rue Lhomond
75231 Paris Cedex 05, France
Tel: +33 1 44 32 22 63 Fax: +33 1 44 32 20 00
email: godard@geologie.ens.fr

Hi!

I just had a similar problem related to DBF file contents. I found that open
office can open the DBF, edit it, and save it again.

Not ideal, but it would be rather simple to remove a field.

Cheers!

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

On Tuesday 11 January 2005 08:42 am, Vincent Godard wrote:

Hi,

I am a new grass user and I would like to know if it is possible to use
grass to deal with geological data, i.e. plane orientations, lineations...
Has someone already done that kind of things and would be ready to share
his experience?

By the way I am having some troubles while importing shapfiles with
v.in.ogr, when I run the command:

v.in.ogr dsn=/home/vincent/Longmen_Shan-data/Geologie/geologic_age.shp
output=geologie layer=geologic_age min_area=0.0001 snap=0.001 -o

I am getting the following error message:

DBMI-DBF driver error:
Column 'GLG' already exists (duplicate name)
Cannot create table.
Error in db_execute_immediate()

ERROR: Cannot create table: create table geologie (cat integer, AREA double
       precision, GLG varchar ( 5 ), GLG varchar ( 5 ), DESCRIPTIO varchar
( 32 ))

It seems that there is a problem with my .dbf file but I don't know what.

Thanks in advance,

Vincent.

Dylan Beaudette wrote:

Hi!

I just had a similar problem related to DBF file contents. I found that open office can open the DBF, edit it, and save it again.

Not ideal, but it would be rather simple to remove a field.

Cheers!

v.in.ogr cnames=

Radim

Vincent Godard wrote:

I am getting the following error message:

DBMI-DBF driver error:
Column 'GLG' already exists (duplicate name)
Cannot create table.

If you have access to ArcGIS then try opening the file there
and renaming the second GLG column to something different
(i.e. GLG2).

If you don't then maybe it is possible to somehow use ogrtools
to change the column name, but I'm not really familiar enough with it.
At the least you can go:

> ogrinfo -al -summary

and this should allow you to confirm the problem is two attributes
of the same name.

Hope this of some help,

Joel

On Wed, Jan 12, 2005 at 12:17:03PM -1200, Joel Peter William Pitt wrote:

Vincent Godard wrote:

>I am getting the following error message:
>
>DBMI-DBF driver error:
>Column 'GLG' already exists (duplicate name)
>Cannot create table.
>
>
If you have access to ArcGIS then try opening the file there
and renaming the second GLG column to something different
(i.e. GLG2).

You can also use OpenOffice for this:

View -> Data
* Sources -> select your data source (probably "Data source 1")
* Tables
     * your table 'whatever_name'
          * click right mouse button on table
              -> Edit table
              -> modify column(s)
              -> Save the table.
* 'Exit' from OpenOffice.

Or you can probably also use db.execute, add a new column,
copy over the values from the other column, then remove this column (untested).

Markus

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy