[gdal-dev] ogr2ogr changes field length

matteo matteo.ghetta at gmail.com
Thu Oct 7 23:10:52 PDT 2021


Hi Even,

> If you add -lco RESIZE=YES fields will be resized to their minimum size. 
> See https://gdal.org/drivers/vector/shapefile.html#layer-creation-options

yep I see. I also read

* String fields without an assigned width are treated as 80 characters

does it mean that if a field is set as TEXT in PG (without length 
definition) the conversion to shapefile is automatically set to 80 and 
what we can do is to resize the field length only to have less characters?

Cheers!

Matteo


More information about the gdal-dev mailing list