[R-sig-Geo] Setting FID values when saving GML files with writeOGR

Karl Ove Hufthammer karl at huftis.org
Thu Aug 25 15:22:45 CEST 2011


Dear list members,

Is it possible to define which FID values should be used when 
saving a SpatialPointsDataFrame to a GML files using writeOGR 
(rgdal package)?

The FID values are stored as <ogr:layername fid="F0"> (and F1, 
F2, …). If I insert a new row in the SPDF, most features change 
their FID, which creates much unneccessary noise in our VCS,
so I would like to use an already existing ID as the FID.

I have tried change both the row.names and adding columns named
‘fid’ and ‘gml_id’, the writeOGR still only uses F0, F1, … as 
the FIDs.

-- 
Karl Ove Hufthammer



More information about the R-sig-Geo mailing list