Dear All,
I am completely new to Spatial analysis, so the question might be stupid,
but need some help for the startup here.

I have a small area coordinate data, (x1 y1)-(x76 y76), those are the
coordinates of 76 vertices of the crossponsing Cantons.
Those data are stored in a spreadsheet, *.csv, there are missing IDs and
NAMEs, and missing coordinates in the file, where missing coordinates are
"NA" in the data.
The data looks like:

ID NAME X1 Y1 X2 Y2 X3 Y3.......X76 Y76

After giving ID and names to the missing cantons, I followed the example in
the package of "shapefile" to convert them to a shapefile
The following is the example from "shapefile"

dd <- data.frame(Id=c(1,1,1,1,2,2,2,2),X=c(3,5,8,3,6,7,8,6),Y=c(9,8,3,9,6,7,4,6))
ddTable <- data.frame(Id=c(1,2),Name=c("Item1","Item2"))
ddShapefile <- convert.to.shapefile(dd, ddTable, "Id", 5)
write.shapefile(ddShapefile, "c:/test", arcgis=T)



The function of "write.shapefile" gives .shp, .dbf and .shx

However when I tried to use readShapePoly to import my converted data,
the error message appeard as
 "Error in Polygon(coords = crds) : ring not closed"

Is this the problem because of missing values ? Does anyone could suggest
me how to fix this?

Looking forward to your reply

Thank you very much.

Fred

	[[alternative HTML version deleted]]

