Skip to content
Prev 5893 / 29559 Next

error in readShapePoly

Thanks Roger!

Are there any instances in which one would want delete_null_obj=FALSE?

-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no] 
Sent: Wednesday, June 10, 2009 10:36 AM
To: Hurlbert, Allen H. (Biology)
Subject: RE: [R-sig-Geo] error in readShapePoly
On Wed, 10 Jun 2009, Hurlbert, Allen H. (Biology) wrote:

            
proj4string,
=
readShapePoly(paste("\\\\Bioark.bio.unc.edu\\hurlbertallen\\GIS\\BirdRan
file
file
It is a bit more revealing:
Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding = 
input_field_name_encoding) :
   NULL geometry found

and suggests using the fix in:
+  delete_null_obj=TRUE)
Warning message:
In .Map2PolyDF(Map, IDs = IDvar, proj4string = proj4string, force_ring =

force_ring,  :
   Null objects with the following indices deleted: 134

So the data provider has inserted a NULL geometry into the data - they 
shouldn't do it, but it has been seen before. Could you summarise to the

list, please? I'll see if I can add a test in readShapePoly to point
users 
to the optional argument.

Roger
for
where,
others
an
but