Skip to content
Prev 1722 / 29559 Next

ring not closed - readShapePoly - read.shape - maptools

A new package, spsurvey, has function to read ESRI shapefiles -
read.shape and read.dbf.  The result is an sp spatial object.  The
functions read point, line, and polygon shapefiles.  package is on CRAN.
We have encountered all types of issues with shapefiles so may handle
your problem.

Tony



                                                                        
             Roger Bivand                                               
             <Roger.Bivand at nh                                           
             h.no>                                                   To 
             Sent by:                 Susumu Tanimura                   
             r-sig-geo-bounce         <stanimura-ngs at umin.ac.jp>        
             s at stat.math.ethz                                        cc 
             .ch                      r-sig-geo at stat.math.ethz.ch,      
                                      patrick.giraudoux at univ-fcomte.fr  
                                                                Subject 
             02/09/2007 10:35         Re: [R-sig-Geo] ring not closed - 
             AM                       readShapePoly - read.shape -      
                                      maptools                          
                                                                        
              Please respond                                            
                    to                                                  
             Roger.Bivand at nhh                                           
                   .no
On Sat, 10 Feb 2007, Susumu Tanimura wrote:

            
Patrick, Susumu,

Could (either or both) you please make sample files available? I think
that readOGR() will do the same as readShapePoly(), even though it does
not use the same intermediate R code (same shapelib code in OGR). The
internal function .Map2PolyDF can be accessed inside the maptools
namespace as maptools:::.Map2PolyDF; it calls
maptools:::.asSpatialPolygonsShapes, calling maptools:::.shp2srsI. This
calls Polygon() with coords set to the current ring, so if it isn't
closed, no check is made. It would be possible to pass an argument
through
closing unclosed rings if TRUE, default FALSE.

Best wishes,

Roger
was
just
read.shape
function
--
Susumu Tanimura MSc PhD
Dept. of Socio-environmental Medicine
Inst. of Tropical Medicine, Nagasaki University
TEL +81-95-849-7865 FAX +81-95-849-7867
e-mail stanimura-ngs at umin.ac.jp

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


--
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

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo