[R-sig-Geo] Error at reading shape file (readOGR())

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Sun May 16 23:13:45 CEST 2010


On Sun, May 16, 2010 at 10:04 PM, Agustin Lobo <alobolistas at gmail.com> wrote:

> OGR data source with driver: ESRI Shapefile
> Source:
> "/media/TRANSCEND/MONTSENY2008/MONTSENY_GEODATA/FloraExotica2009/AilantMSY09/",
> layer: "AilantMSY09"
> with 62 features and 29 fields
> Error in make.names(fldnms, unique = TRUE) : invalid multibyte string 9

 The error message seems to come from the part of the code that
converts the DBF column names to valid R column names...

> (Using R version 2.11.0, rgdal 0.6-26 and GDAL 1.6.3)
>
> Any guide on how to debug this problem? I've looked at the dbf file and
> do not see anything weird.

 Ah, but one man's weird is another man's accented character! Do the
column names of the DBF have anything that someone on my side of the
English Channel would think of as 'weird'? :)

 How does read.dbf in the foreign package handle the DBF part of the shapefile?

Barry



More information about the R-sig-Geo mailing list