Hi Alex,
You can do this:

 > spatstat.options(checkpolygons=FALSE)
 > W <- as(SP, "owin")
 > plot(w)

but you must trust the geometry of your polygons. By default owin 
check the integrity of polygon data, see this from the help of 
"spatstat.options":checkpolygons
Logical flag indicating whether the functions 
<http://127.0.0.1:12737/library/spatstat/html/../../spatstat/help/owin>owin 
and 
<http://127.0.0.1:12737/library/spatstat/html/../../spatstat/help/as.owin>as.owin 
should check the validity of polygon data. It is advisable to leave 
this set to TRUE. If you set checkpolygons=FALSE, no checking will be 
performed, making it possible to create window objects whose topology 
is garbled. This can be useful for inspecting spatial data that 
contain errors, for example, when converting data from shapefiles. 
However, other functions in spatstat may return incorrect answers on 
these data.


Cheers,

Marcelino


At 03:29 31/03/2011, Axel Urbiz 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
>R-sig-Geo@r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo

____________________________________

Marcelino de la Cruz Rot
Depto. Biologia Vegetal
EUIT Agricola
Universidad Politecnica de Madrid

tel: 34 + 913365435
____________________________________  
	[[alternative HTML version deleted]]

