AnsweredAssumed Answered

arc.write: unknown structure error

Question asked by ftonini_msugis on Jul 27, 2017
Latest reply on Aug 2, 2017 by SWalbridge-esristaff

I am getting an "unknown structure error" when using arc.write from the latest arcgisbindings pkg. I tried to follow the example in the package vignette for arc.write. I am guessing it is not using the correct coords or shape_info like it should...Any idea how should I fix this? Here are my steps:


1) Reading a polygon shp,

2) Extracting its data.frame,

3) Joining it with an existing R data.frame (by a common attribute name)

4) Saving it back to a new shp



fc <-<input_shapefile>)
fc.df <-

fc.df_join <- left_join(fc.df, <existing_dataframe>, by = 'ISO_3_CODE')


[1] 211 11


arc.write(path="./output.shp", data=fc.df_join,

               coords = arc.shapeinfo(fc)$WKT,

               shape_info = arc.shapeinfo(fc))


Error in .call_proxy("arc_export2dataset", path, data, coords, shape_info) :
unknown structure
In addition: Warning message:
In .call_proxy("arc_export2dataset", path, data, coords, shape_info) :
length of shape != data.frame length