On Fri, 22 Jun 2007, Agustin Lobo wrote: > Dear sig-geos, > > I have to calculate a distmap (that is, a map > in which the value of each cell is the distance > from the cell to a given object) for a set of polygons. > It seems to me that distmap.owin in spatstat would do it > fine, but distmap.owin does not accept objects > imported from shp vectors via readOGR. distmap.owin requires > type "polygonal" and readOGR yields class 'SpatialPolygonsDataFrame' > Is there any way to cast or convert from 'SpatialPolygonsDataFrame' > to "polygonal" or an alternative function to calculate the distances > to the boundaries of the polygons?
Have you tried coercing with as(x, "owin") in maptools? Roger > > Thanks > > Agus > > -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [EMAIL PROTECTED] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo