<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
text="#000000">
I'd bet it's because "PRIMARY" is a Postgresql (and most DB's)
reserved word...<br>
Try using the cnames param to v.in.ogr to change names for all
columns.<br>
<br>
<br>
On 03/21/2012 05:22 PM, Rich Shepard wrote:
<blockquote
cite="mid:alpine.LNX.2.00.1203210805380.10399@salmo.appl-ecosys.com"
type="cite"> Please help me to understand why an .e00 file that I
imported yesterday
<br>
(when dbf was the default attribute database) produces errors when
I try
<br>
today to re-import it using the pg database driver and I am
connected (and
<br>
logged in) to the appropriate database. Here is the
grass_cmd_history
<br>
contents:
<br>
<br>
(Wed Mar 21 08:03:27 2012) v.in.e00 -v --overwrite
file=/home/rshepard/GIS/data/Washington/hydrography/kettle_river/s7020002.e00
type=line vect=streams
<br>
An error may appear next which will be ignored...
<br>
E00 Compressed ASCII found. Will uncompress first...
<br>
...converted to Arc Coverage in current directory
<br>
Importing lines...
<br>
Over-riding projection check
<br>
Layer: ARC
<br>
Column name changed: 'S7020002#' -> 'S7020002_'
<br>
Column name changed: 'S7020002-ID' -> 'S7020002_ID'
<br>
Column name changed: 'STATE-2' -> 'STATE_2'
<br>
Column name changed: 'COUNTY-2' -> 'COUNTY_2'
<br>
Column name changed: 'QUAD100-2' -> 'QUAD100_2'
<br>
Column name changed: 'QUAD75-2' -> 'QUAD75_2'
<br>
Column name changed: 'PNTR#' -> 'PNTR_'
<br>
DBMI-Postgres driver error:
<br>
Cannot execute:
<br>
create table streams (cat integer, UserId integer, FNODE_
<br>
integer, TNODE_ integer, LPOLY_ integer, RPOLY_ integer,
<br>
LENGTH double precision, S7020002_ integer, S7020002_ID
<br>
integer, FEAT_NAME varchar ( 60 ), HUC integer, SEG integer,
<br>
RMI double precision, MAJOR1 integer, MINOR1 integer, MINOR2
<br>
integer, MINOR3 integer, FEAT_SRC varchar ( 2 ), STATE
<br>
varchar ( 4 ), STATE_2 varchar ( 4 ), COUNTY varchar ( 15 ),
<br>
COUNTY_2 varchar ( 15 ), QUAD100 varchar ( 26 ), QUAD100_2
<br>
varchar ( 26 ), QUAD75 varchar ( 25 ), QUAD75_2 varchar ( 25
<br>
), CEN integer, CUMLENGTH double precision, DNARC integer,
<br>
PNTR_ integer, SAVENEG integer, SINUOUS double precision,
<br>
UHUC1 integer, UPNTR1 integer, UHUC2 integer, UPNTR2
<br>
integer, UHUC3 integer, UPNTR3 integer, UFLAG integer, DHUC
<br>
integer, DPNTR integer, CSEG integer, CRMI double precision,
<br>
CNAME varchar ( 30 ), RRN varchar ( 17 ), LLID varchar ( 13
<br>
), OW_NAME varchar ( 60 ), PRIMARY integer, SECONDARY
<br>
integer, DESCRIPTOR integer)
<br>
ERROR: syntax error at or near "integer"
<br>
LINE 1: ...D varchar ( 13 ), OW_NAME varchar ( 60 ), PRIMARY
<br>
integer, S...
<br>
^
<br>
ERROR: Unable to create table: 'create table streams (cat integer,
UserId integer, FNODE_ integer, TNODE_ integer, LPOLY_ integer,
RPOLY_ integer, LENGTH double precision, S7020002_ integer,
S7020002_ID integer, FEAT_NAME varchar ( 60 ), HUC integer, SEG
integer, RMI double precision, MAJOR1 integer, MINOR1 integer,
MINOR2 integer, MINOR3 integer, FEAT_SRC varchar ( 2 ), STATE
varchar ( 4 ), STATE_2 varchar ( 4 ), COUNTY varchar ( 15 ),
COUNTY_2 varchar ( 15 ), QUAD100 varchar ( 26 ), QUAD100_2 varchar
( 26 ), QUAD75 varchar ( 25 ), QUAD75_2 varchar ( 25 ), CEN
integer, CUMLENGTH double precision, DNARC integer, PNTR_ integer,
SAVENEG integer, SINUOUS double precision, UHUC1 integer, UPNTR1
integer, UHUC2 integer, UPNTR2 integer, UHUC3 integer, UPNTR3
integer, UFLAG integer, DHUC integer, DPNTR integer, CSEG integer,
CRMI double precision, CNAME varchar ( 30 ), RRN varchar ( 17 ),
LLID varchar ( 13 ), OW_NAME varchar ( 60 ), PRIMARY integer,
SECONDARY integer, DESCRIPTOR inte
<br>
ger)'
<br>
ERROR: An error occurred while running v.in.ogr
<br>
(Wed Mar 21 08:03:27 2012) Command finished (0 sec)
<br>
<br>
db.connect -p shows connection to the proper database and I'm
logged in
<br>
(db,login) as the user (who owns that database).
<br>
<br>
There must be something in the spelling of 'integer' that grass
doesn't
<br>
like, but I cannot find the error. And, I've no idea where to
look.
<br>
<br>
Rich
<br>
<br>
<br>
_______________________________________________
<br>
grass-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
<br>
<br>
This mail was received via Mail-SeCure System.
<br>
<br>
<br>
</blockquote>
<p><br>
</p>
</body>
</html>