Hi there:

I am trying to have R read a shapefile of a simple landscape classification
(posted here <http://temp-share.com/show/3YgF8Kd4x>) and am getting an
error message, which I'm not sure how to resolve:

> Shape2 <-readShapePoly("JustForest_BahiaSul_1990.shp")

Error in Polygon(coords = crds) : ring not closed


I also tried specifying force_ring=TRUE, which does not seem to help:

> shape3 <-readShapePoly("JustForest_BahiaSul_1990_Test.shp", force_ring=TRUE, delete_null_obj=TRUE)Error in Polygon(coords = crds) : ring not closed

The same error results when I try with rgdal as an alternative:

> shape1 <-readOGR("JustForest_BahiaSul_1990_Test.shp", layer="JustForest_BahiaSul_1990_Test")OGR data source with driver: ESRI Shapefile
Source: "JustForest_BahiaSul_1990_Test.shp", layer:
"JustForest_BahiaSul_1990_Test"
with 19122 features and 6 fields
Feature type: wkbPolygon with 2 dimensionsError in
stopifnot(is.list(srl)) : ring not closed


If it's of any use in troubleshooting, here is another shapefile
(posted here <http://temp-share.com/show/KdPfyYg6h>) that was
generated by the same collaborator of the same landscape just
classified at another point in time, which R is reading without any
problem.  I can't seem to figure out why
"JustForest_BahiaSul_2007.shp" is being read successfully, and
"JustForest_BahiaSul_1990.shp" is not.

Many thanks in advance for offering your time and sage R-dom.

Best, Danielle


sessionInfo()


R version 2.15.3 (2013-03-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets
[7] methods   base

other attached packages:
[1] rgdal_0.8-8     maptools_0.8-23 lattice_0.20-13
[4] sp_1.0-9        foreign_0.8-52

loaded via a namespace (and not attached):
[1] tools_2.15.3




Danielle Ivonne Rappaport
Master of Forestry 2012, Yale University
Skype | Danielle_Rappaport

	[[alternative HTML version deleted]]

