<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font face="Helvetica, Arial, sans-serif">Ok thanks Markus for
your answer. <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">But I have another
question : <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">I have 2 differents
vectors with the same attribute table structure. <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">This problem is just
for one of them.</font></p>
<p><font face="Helvetica, Arial, sans-serif">For the first vector
the attribute table is like that : <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">> name
type length<br>
><br>
> cat integer
20<br>
> ID character 24
<br>
> PREC_PLANI double precision 20<br>
> NATURE character 31<br>
> HAUTEUR integer 20<br>
> id_2 integer
20</font></p>
<p><font face="Helvetica, Arial, sans-serif">and for the second :</font></p>
<p><font face="Helvetica, Arial, sans-serif"><font face="Helvetica,
Arial, sans-serif">> name type
length<br>
><br>
> cat integer
20<br>
> ID text 1000
<br>
> PREC_PLANI double precision 20<br>
> NATURE text 1000<br>
> HAUTEUR integer 20<br>
> id_2 integer
20</font></font></p>
<p><font face="Helvetica, Arial, sans-serif">So when I want to patch
my 2 vectors with v.patch, there is the following message : <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">(Thu Apr 5 15:01:50
2018) <br>
v.patch -e --overwrite --verbose
input=zone_vegetation_D90_decoupe@AIP_RONCHAMP_MNE,zone_vegetation_D70_decoupe@AIP_RONCHAMP_MNE
output=TEST_merge_D70_D90<br>
ERROR: Length of string columns differ<br>
(Thu Apr 5 15:01:51 2018) La commande s'est terminée (1 sec) <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif"><br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif"><br>
</font></p>
<br>
<div class="moz-cite-prefix">Le 05/04/2018 à 14:41, Markus Metz a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAG+h=FH_7AeidobGAVAo=fUeHStf1crkogniToc=28OX=Q_oAw@mail.gmail.com">
<div dir="ltr">
<div><br>
<br>
On Wed, Apr 4, 2018 at 5:54 PM, Camille Bezzina <<a
href="mailto:camille.bezzina@geophom.fr"
moz-do-not-send="true">camille.bezzina@geophom.fr</a>>
wrote:<br>
><br>
> Hello all,<br>
><br>
><br>
> I have a problem when I want to modify an attribute
table.<br>
><br>
> I add a new vector with v.in.ogr. My attribute table is
build like that :<br>
><br>
> name type
length<br>
><br>
> cat integer
20<br>
> ID character
24 <br>
> PREC_PLANI double precision 20<br>
> NATURE character 31<br>
> HAUTEUR integer 20<br>
> id_2 integer
20<br>
><br>
><br>
> I would like to remove the column 'HAUTEUR', but when I
remove this<br>
> column, my two character columns (ID and NATURE) change
automatically to<br>
> become :<br>
><br>
> ID text 1000<br>
> NATURE text 1000<br>
><br>
> Do you know why the simple fact to remove a column
(HAUTEUR) change type<br>
> and length of other columns.<br>
<br>
</div>
The reason is that GRASS uses SQLite as database manager, and in
SQLite there is nothing like varchar(24), only text without any
length restrictions. That means, when importing vector data with
attributes, any text fields are converted to text by SQLite
itself. The value 1000 as length for text is somewhat misleading
here because the maximum allowed length in SQLite is by default
1 billion.<br>
<div><br>
</div>
<div>Markus M<br>
</div>
<div>><br>
> Thanks,<br>
> --<br>
><br>
> Camille BEZZINA<br>
> Chargé d'études géomatiques et photomontages<br>
> Geophom<br>
> 57 rue du Chemin Neuf 44521 OUDON<br>
> Standard: +33(0)2 85 52 02 59<br>
> Ligne directe: +33(0)9 72 56 81 71<br>
> <a href="http://www.geophom.fr" moz-do-not-send="true">www.geophom.fr</a><br>
><br>
> _______________________________________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org"
moz-do-not-send="true">grass-user@lists.osgeo.org</a><br>
> <a
href="https://lists.osgeo.org/mailman/listinfo/grass-user"
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br>
</div>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<style>
div#signature {font-size:10px;color:#666;margin:10px 0}
div.nom {font-weight:bold}
div.titre {}
div.geophom {font-size:11px;font-weight:bold;color:#A1CD1A;margin-top:10px}
div#voeux {font-size:10px;margin-top:10px}
</style>
<div id="signature">
<div class="nom">Camille BEZZINA</div>
<div class="titre">Chargé d'études géomatiques et photomontages</div>
<div class="geophom">Geophom</div>
57 rue du Chemin Neuf 44521 OUDON<br>
Standard: +33(0)2 85 52 02 59 <br>
Ligne directe: +33(0)9 72 56 81 71<br>
<a class="moz-txt-link-abbreviated" href="http://www.geophom.fr">www.geophom.fr</a><br>
</div>
</div>
</body>
</html>