Skip to content
Prev 23765 / 29559 Next

rgdal 1.1-1 bug?

James & all--
With your shapefile I can reproduce your problem under Windows 7x64 in R
3.2.2 rgdal_1.1-1 sp_1.2-1, but not R 3.1.2 rgdal_0.9-3 sp_1.1-1 or
earlier.  Both rgdals are linked to gdal 1.11.2 released 2015/02/10.
I also can reproduce the issue writing to & reading from GeoJSON instead of
shapefiles.  Files written by rgdal 1.1-1 have the lines connecting holes
when read by rgdal_0.9-3, but files written by rgdal_0.9-3 are read fine by
1.1-1.

The rarity about the shapefile in question is that it has 57 holes in the
same polygon, which (along with the lines connecting holes) suggests that
the issue might be related to SpatialPolygons not assigning holes to
specific (non-hole) polygons, see:
http://finzi.psych.upenn.edu/R/library/rgeos/html/comment-functions.html

I don't have time (or ability) to go much further right now in terms of
finding the change, but perhaps someone else can?

Tom 2
On Fri, Dec 4, 2015 at 2:34 PM, Michael Sumner <mdsumner at gmail.com> wrote: