error with countriesLow
mdsumner opened this issue · comments
Michael Sumner commented
I get this in 0.1-0
library(rworldmap)
data(countriesLow)
library(cleangeo)
x <- clgeo_Clean(countriesLow)
Error in SpatialPolygonsDataFrame(Sr = fixed.sp, data = as(sp, "data.frame")) :
row.names of data and Polygons IDs do not match
Thanks! (I'll explore more when I have a chance).
Emmanuel Blondel commented
Thanks @mdsumner i will have a look later today and report to you asap
Emmanuel Blondel commented
Fixed.
For testing, you will need to install again cleangeo
from Github doing:
require(devtools)
install_github("eblondel/cleangeo")
Then you can test it:
library(rworldmap)
data(countriesLow)
#inspect input data
sp <- countriesLow
report <- clgeo_CollectionReport(sp)
clgeo_SummaryReport(report)
#fix the geometries & inspect again
sp.fixed <- clgeo_Clean(sp)
report.fixed <- clgeo_CollectionReport(sp.fixed)
clgeo_SummaryReport(report.fixed)
Emmanuel Blondel commented
The fix has been released in cleangeo 0.1-1
and now in CRAN. Closing the ticket.