[R-sig-Geo] Define aliases in shapefiles
Arnaud Mosnier
a.mosnier at gmail.com
Thu Apr 9 19:51:11 CEST 2015
Creating a .qml file for visualisation in QGIS is easy as it is an HTML
file like this.
<qgis>
<aliases>
<alias field="test" index="2" name="HEREISMYNEWNAMEhgfgfdcgt"/>
</aliases>
</qgis>
So I will create this for each of my shapefile ... but I expected that it
could be embedded into the other "classic" shapefile files and could be
read everywhere (it least in the most common GIS softwares).
Have a good day !
Arnaud
2015-04-09 7:50 GMT-04:00 Rainer M Krug <Rainer at krugs.de>:
> 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>
> wrote:
> >> Dear useRs,
> >>
> >> I am searching for a way to break the 10 character limit of the field
> names
> >> 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
> of a
> >> 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
>
>
> >
> > Barry
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel : +33 - (0)9 53 10 27 44
> Cell: +33 - (0)6 85 62 59 98
> Fax : +33 - (0)9 58 10 27 44
>
> Fax (D): +49 - (0)3 21 21 25 22 44
>
> email: Rainer at krugs.de
>
> Skype: RMkrug
>
> PGP: 0x0F52F982
>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list