[GRASS-dev] [GRASS GIS] #1915: v.out.ogr: problem to export certain column(s)
GRASS GIS
trac at osgeo.org
Thu Apr 4 02:11:27 PDT 2013
#1915: v.out.ogr: problem to export certain column(s)
-----------------------+----------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: v.out.ogr | Platform: Linux
Cpu: All |
-----------------------+----------------------------------------------------
When trying to export a density vector polygon map, some strange
column export problem occurs:
{{{
GRASS 7.0.svn (ll_wgs84):~ > v.out.ogr dep_new_clean dsn=dep_new_clean.shp
type=area
Warning 1: Field PROVDEP of width 1000 truncated to 255.
Warning 1: Field MIN_NOMDEP of width 1000 truncated to 255.
Warning 1: Field JURISDICC of width 1000 truncated to 255.
Warning 1: Field MIN_DEPTO of width 1000 truncated to 255.
Warning 1: Field MIN_PROV of width 1000 truncated to 255.
Warning 1: Field PROVINCIA of width 1000 truncated to 255.
ERROR 6: Failed to add field named 'normalization' <<----- !
Exporting 702 areas (may take some time)...
100%
v.out.ogr complete. 702 features written to <dep_new_clean>
(ESRI_Shapefile).
}}}
Indeed, the column "normalization" is lacking, checked with
{{{
ogrinfo -so dep_new_clean.shp dep_new_clean
}}}
The GRASS attribute columns are:
{{{
v.info -c dep_new_clean
Displaying column types/names for database connection of layer <1>:
INTEGER|cat
TEXT|PROVDEP
TEXT|MIN_NOMDEP
TEXT|JURISDICC
TEXT|MIN_DEPTO
TEXT|MIN_PROV
TEXT|PROVINCIA
INTEGER|COD_NUM
INTEGER|pob_1991
INTEGER|pob_2001
INTEGER|pob_2010
DOUBLE PRECISION|perimetro
DOUBLE PRECISION|superficie
DOUBLE PRECISION|dens_2001
DOUBLE PRECISION|dens_2010
DOUBLE PRECISION|incid
DOUBLE PRECISION|n_sph
DOUBLE PRECISION|normalization
}}}
More detailed:
{{{
...
D2/3: cat x dens_2001 -> cat x dens_2001 -> keycol = 0
D3/3: col 14: dens_2010 sqltype=6 ctype=3 width=20
D2/3: ogr_ftype = 2
D2/3: cat x dens_2010 -> cat x dens_2010 -> keycol = 0
D3/3: col 15: incid sqltype=6 ctype=3 width=20
D2/3: ogr_ftype = 2
D2/3: cat x incid -> cat x incid -> keycol = 0
D3/3: col 16: n_sph sqltype=6 ctype=3 width=20
D2/3: ogr_ftype = 2
D2/3: cat x n_sph -> cat x n_sph -> keycol = 0
D3/3: col 17: normalization sqltype=6 ctype=3 width=20
D2/3: ogr_ftype = 2
D2/3: cat x normalization -> cat x normalization -> keycol = 0
ERROR 6: Failed to add field named 'normalization'
Exporting 702 areas (may take some time)...
D3/3: Vect_get_area_centroid(): area = 1
D3/3: Vect_read_line(): line = 525
D3/3: V2_read_line_nat(): line = 525
D3/3: Vect__Read_line_nat: offset = 3782596
D3/3: type = 8, do_cats = 1 dead = 0
D3/3: n_cats = 1
D3/3: n_points = 1
D3/3: off = 3782625
D3/3: area = 1 centroid = 525 ncats = 1
D3/3: Vect_get_area_points(): area = 1
...
}}}
DB driver:
{{{
v.db.connect -p dep_new_clean
Vector map <dep_new_clean> is connected by:
layer <1/dep_new> table <dep_new_clean> in database
</home/user/grassdata//ll_wgs84/argentina/sqlite/sqlite.db> through driver
<sqlite> with key <cat>
}}}
{{{
g.version -b
...
revision=55619
build_date=2013-03-04
}}}
Idea: is "normalization" a reserved SQL word? If so, the
user should not be even able to use it as column name
(this column was added in the wxGUI, Attribute manager,
Manage tables, Add column).
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1915>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list