Opened 8 years ago
Closed 6 years ago
#3093 closed defect (worksforme)
v.in.ogr: shapefile with Date/NULL-field prevents creation of db-table
Reported by: | Melwin | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | Vector | Version: | 7.0.3 |
Keywords: | v.in.ogr, sql, | Cc: | |
CPU: | Unspecified | Platform: | MSWindows 7 |
Description
The attached shapefile contains a single polygon. The respective data table has a field ("Date") which is NULL. When I import the attached shapefile
v.in.ogr dsn=./Water_RE_20091111.shp output=raiz_outline layer=Water_RE_20091111 min_area=0.0001 type=boundary snap=-1
I get the warning
WARNUNG: Kann Datei './madalena_test/PERMANENT/.tmp/unknown/vector/tmp_6680/coor' nicht löschen.
("cannot delete file ...")
and the corresponding table is not created.
When switching to dbf-driver, the problem persist and issues
ERROR: cannot create table: 'create table raiz_outline3 (cat
integer, OBJECTID integer, Date date, SHAPE_Leng double precision, SHAPE_Area double precision, Name varchar ( 50 ))'
If I remove the column "Date", everything works as expected.
I can produce this behaviour in GRASS 7.0.3 and 6.4.1 (Windows 7, 64 bit). The latter even hangs when I try to display the attribute table from the GUI then.
cheers, Melwin
Attachments (1)
Change History (5)
by , 8 years ago
Attachment: | Reservoir_outlines2.zip added |
---|
comment:1 by , 8 years ago
Component: | Database → Vector |
---|---|
Keywords: | v.in.ogr sql added |
comment:2 by , 8 years ago
Milestone: | 7.0.5 → 7.0.6 |
---|
comment:3 by , 7 years ago
Milestone: | 7.0.6 → 7.0.7 |
---|
comment:4 by , 6 years ago
Milestone: | 7.0.7 → 7.6.2 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Unable to reproduce in GRASS 7.6.0:
> v.in.ogr in=/vsizip//home/martin/Downloads/Reservoir_outlines2.zip -o Over-riding projection check > v.info -c Water_RE_20091111 Displaying column types/names for database connection of layer <1>: INTEGER|cat INTEGER|OBJECTID DATE|Date DOUBLE PRECISION|SHAPE_Leng DOUBLE PRECISION|SHAPE_Area CHARACTER|Name
Date is reserved SQL word. It cannot be used for column name. You can rename this column using
columns
options (whole list of columns must be defined). The module could be of course more cleaver and rename such column automatically eg. toDate_
.