Skip to content
Prev 8302 / 29559 Next

Shape in Latin-1

On Tue, 18 May 2010, Daniel wrote:

            
Please do read the error messages, and do not jump to conclusions. Always 
examine the output of traceback() after an error. In the first case, you 
do not show the file name, nor have you tried list.files() to show that 
the file is where you think it is (it doesn't seem to be there). In the 
second case, as the error message says, there is no encoding= argument to 
readShape*() - does it say there is on the help page?

Are you refering to the field names in the DBF, or to the contents of the 
fields? Can you read the DBF file itself with read.dbf() in the foreign 
package (used in maptools)? So far, you have not established that your 
beliefs about the encoding are the problem here.

If the issue is in the field names, have you tried readOGR() in rgdal, 
which does have an argument for setting the encoding of field names? If 
you feel that rgdal is not available for OSX, I can with pleasure thank 
Brian Ripley for making both 32-bit and 64-bit Intel versions available on 
CRAN extras - use:
Roger