[R-sig-Geo] Problem in converting SpatialPolygonsDataFrame to owin object
Edzer J. Pebesma
e.pebesma at geo.uu.nl
Thu Sep 14 09:29:27 CEST 2006
Debarchana Ghosh wrote:
>
>
>
> works fine; I modified the code such that
> xx1<-as(xx, "owin")
>
> will work fine as well in the future.
> --
>
>
>
> So I just download and install the updated spspatstat package?
I said "future", not "near future" or "now"; spspatstat isn't on CRAN.
If you wish you could download the source from anonymous cvs on the
r-spatial sourceforge project. It is not there where your problem is,
however, as you were able to transform to SpatialPolygons anyway.
> Also, I know attachment is not the right way to converse on this
> list-serve but I couldn't think of any other way to show my study
> area. So I've attached the image of my study area (polygon). As i've
> mentioned in my earlier email, I've read a shapefile in R and created
> a object (xx) of class SpatialPolygonDataFrame. Howver when I try to
> convert xx to owin I get the following error. As shown in the
> attachment, the lines do not intersect but has 7 contigous US counties.
>
> Any solution to this problem will be very helpful.
The problem may be that polygons are only slightly intersecting (which
you cannot find out from a bitmap image), or that some code is making
wrong assumptions. The error message comes from the owin function in the
spatstat package. If the author of the package doesn't listen to this
list, you could contact him directly (I Cc:d this message). To me, at
first glance it looked like the error generating code is a fairly recent
add to spatstat, but I may be wrong on that.
--
Edzer
More information about the R-sig-Geo
mailing list