Skip to content
Back to formatted view

Raw Message

Message-ID: <4CD02916.2050105@u-psud.fr>
Date: 2010-11-02T15:07:02Z
From: Antoine Gardarin
Subject: Error when reading shapefiles (readOGR) with rgdal

Dear all

I am having problems when reading shapefiles using readOGR with the 
rgdal package. I have read several times these files in the past without 
any problem. Since a few days, while I apparently did not change 
anything (no update, similar version of R, same shapefiles), I always 
have this error with the following statement:

 > sol <- readOGR(dsn = ".", "sol")

 >> Erreur dans ogrInfo(dsn = dsn, layer = layer, 
input_field_name_encoding = input_field_name_encoding) :
 >> GDAL Error 4: Record count in .shp header is -3, which seems 
unreasonable. Assuming header is corrupt.

This error initially occurred with version 2.11.0 of R. I uninstalled R, 
installed the version 2.12.0 for Windows, I updated all the packages, 
but the trouble persists. The same files can be read on other computers 
of my colleagues, whatever the version of R and rgdal.

How can I solve this? Many thanks in advance.


Antoine