[R-sig-Geo] How can I convert a "SpatialPolygons" object to a "polylist"?

Jim Burke j.burke at earthlink.net
Sun May 3 06:07:25 CEST 2009


And using shape2poly does not work either.

 >census_poly_sp <- shape2poly(census_sp, region.id = NULL)
Error in shape2poly(census_sp, region.id = NULL) :
  No shp component in this list


The above file was read in (see below). Internal
measurements are in long lats. I can spplot and
make a KML file just fine for example.
census_sp <- readShapePoly("HD_102_census_blocks_sp.shp",
IDvar="BLKIDFP00", proj4string=CRS("+init=epsg:4326"))


Thanks,
Jim Burke



Jim Burke wrote:
> How can I convert a "SpatialPolygons" object to a "polylist"
> I have a file read in with "readShapePoly". This contains the polygon
> long lats in a slot called "coords". I want to use the package "splancs"
> "inout" function which works according to the doc with polygon data sets.
> An example Map2Poly which works with "inout" lists itself as a class 
> "polylist". 
> Thanks,
> Jim Burke
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>



More information about the R-sig-Geo mailing list