[R-sig-Geo] plotting shapefile facilities

Roger Bivand Roger.Bivand at nhh.no
Fri Apr 14 18:02:55 CEST 2006


On Fri, 14 Apr 2006, didier leibovici wrote:

> Dear all,
> I read a shapefile using shapefiles package.
> Now I would I would like to go around the facilities to plot the shapefile.
> Is there any summary of all functionnalities related to "play" with a 
> shapefile object?

You'll find helper functions in the maptools package to convert the object 
read by read.shapefile() into a polylist object, or lines or points, see 
?shape2poly. A plot method is defined for the polylist class.

You may find the classes in the sp package more convenient to use, and 
they have a wider selection of methods. Then readShapePoly() in the 
maptools package, or readOGR() in the rgdal package would be a more direct 
route.

Roger

> thanks
> 
> 

-- 
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: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list