[R-sig-Geo] Help: creating owin{spats​​tat} objects from GIS data

glionel g.lionel at lycos.com
Thu Mar 31 12:39:47 CEST 2011


Dear Axel, I am new user of spatsat but I am working with that tool. If you have the shape in ESRI format .shp, I can suggest you to use the following commands library(maptools) S <- readShapePoly("C:/../.../Documents/.../.../....shp")#the link to your file on your computer library(sp) SP <- as(S, "SpatialPolygons") W <- as(SP, "owin")#your converted owin object plot(W) 
On Mar 31, 2011, Axel Urbiz [via R-sig-geo] <ml-node+6225601-1939504292-328036 at n2.nabble.com> wrote: 

Dear List, I'm trying to create an object of class "owin" (observation window) in the package spatstat from GIS mapping data. Here's an example of my problem. Everything goes well until the last line of code. I get the error message shown at the bottom: library(spatstat) library(sp) library(maptools) con <- url(" http://gadm.org/data/rda/CHE_adm1.RData" ) class(con) print(load(con)) close(con) SP <- as(gadm, "SpatialPolygons") W <- as(SP, "owin") "Error in owin(poly = opls) :   Polygon data contain overlaps between polygons" Thanks for any help, Axel.         [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [hidden email]  https://stat.ethz.ch/mailman/listinfo/r-sig-geo    


If you reply to this email, your message will be added to the discussion below: 
http://r-sig-geo.2731867.n2.nabble.com/Help-creating-owin-spats-tat-objects-from-GIS-data-tp6225601p6225601.html 
To start a new topic under R-sig-geo, email ml-node+2731867-728108618-328036 at n2.nabble.com   To unsubscribe from R-sig-geo, click here . 




--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Help-creating-owin-spats-tat-objects-from-GIS-data-tp6225601p6226614.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list