Skip to content

Problem in converting SpatialPolygonsDataFrame to owin object

2 messages · Debarchana Ghosh, Edzer Pebesma

#
Debarchana Ghosh wrote:
These error messages are from spatstat, and seem to indicate that there 
is a problem with the polygons you provide: do they have line segments 
that intersect?
You can ignore this message; proceed with the previous version.
SpatialPolygonDataFrame simply extends SpatialPolygons with a data slot 
containing the attributes. The is() relation holds, but it was 
inherits() that was used in the code. Changed that.
The

as(xx, "SpatialPolygons")
works fine; I modified the code such that
xx1<-as(xx, "owin")

will work fine as well in the future.
--
Edzer