Barry Rowlingson <b.rowlingson at lancaster.ac.uk> writes:
On Wed, Apr 8, 2015 at 7:53 PM, Arnaud Mosnier <a.mosnier at gmail.com>
Dear useRs,
I am searching for a way to break the 10 character limit of the field
in shapefiles created using for example the writeOGR function from the
rgdal package.
On way could be to define aliases for field names, but I am not aware
function allowing me to do that.
Are aliases an ArcGIS thing for shapefile names? I can only see vague
references on the internet to something like that. Do you create field
name aliases in ArcGIS? Are they saved with the shapefile or with the
ArcGIS file? Do you get a foo.shp.xml file that is keeping this extra
metadata around? Perhaps we could reverse-engineer that and create it
in R.
Standards-compliant shapefiles can only have 10-character field names.
You could use another file format, such as GML or Spatialite, as long
as whatever you are saving these for can read them.
There is always the possibility of a homegrown version, which should not
be to difficult to implement. As soon as the shape file has been loaded,
you can change the field names, and before you save it, you could change
them back. The longer field names could be saved in a file.
Rainer