[gdal-dev] ogr2ogr changes field length

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Fri Oct 8 02:53:30 PDT 2021


Hi,

GDAL has the internal default of 80 characters. GDAL users do not really need other options because fields are automatically expanded when longer strings are appended afterwards but if the shapefile is used in some other software it does happen that it is impossible to insert long strings because there is no room for that in the table. I suppose that you also know that by using the field width of 254 you are also maximizing the size of the .dbf file because it reserves the same fixed amount of disk space for each cell.

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: matteo <matteo.ghetta at gmail.com> 
Lähetetty: perjantai 8. lokakuuta 2021 12.29
Vastaanottaja: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi>; Even Rouault <even.rouault at spatialys.com>; gdal-dev at lists.osgeo.org
Aihe: Re: [gdal-dev] ogr2ogr changes field length

Hi Jukka,

works perfectly, thanks!

so no default options to impose the field length but it is alterable after

Cheers!

Matteo


More information about the gdal-dev mailing list