[R-sig-Geo] maptools package rejects some polygon shapefiles?

Roger Bivand Roger.Bivand at nhh.no
Wed May 11 22:07:59 CEST 2005


On Wed, 11 May 2005, Rick Reeves wrote:

> News flash: the read.shapefile() method in the shapefiles package reads
> the file. 

It would be useful to see what getinfo.shape(filen) says, and to have a 
sight of the file. The error message suggests that it is neither type 3 
(PolyLine) nor type 5 (Polygon), so ArcGIS 9 must be using other codes 
(perhaps for PolyLineM, PolyLineeM, or their polygon equivalents). If you 
could make the file available, it may be possible to try to handle files 
like this (benefitting others, since you have a working solution).

Roger

> 
> btw, this is a shapefile based on the VMAP0 / DCW dataset.
> 
> RR
> 
> Scientific Programmer / Quantitative Analyst
> National Center for Ecological Analysis and Synthesis
> University of California, Santa Barbara
> 805 892 2534
> reeves at nceas.ucsb.edu
> 
> 
> 
> -----Original Message-----
> From: r-sig-geo-bounces at stat.math.ethz.ch
> [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of Rick Reeves
> Sent: Wednesday, May 11, 2005 9:46 AM
> To: r-sig-geo at stat.math.ethz.ch
> Subject: [R-sig-Geo] maptools package rejects some polygon shapefiles?
> 
> 
> 
> 
> Greetings: 
> 
> Using maptools in the Win XP environment, trying to
> display an ESRI Shapefile (created with ArcMAP GIS ver 9)
> outline map of North America. read.shape throws error:
> Error in read.shape: Not a valid shape type. 
> 
> read.sahpe does read (and plot displays) a point shapefile 
> created on the same platform. 
> 
> Any hints on determining the problem with 'not valid' shapefiles
> in R? 
> 
> Thanks, 
> Rick R
> 
> 
> Scientific Programmer / Quantitative Analyst
> National Center for Ecological Analysis and Synthesis
> University of California, Santa Barbara
> 805 892 2534
> reeves at nceas.ucsb.edu
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> _______________________________________________
> 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




More information about the R-sig-Geo mailing list