Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-05-01 Thread Anne C. Hanna
Roger, Works for me now. Thanks for your patience with this. I'll definitely look at sf for future projects, but for now, I just want to analyze my darn data! :) - Anne On 05/01/2017 05:23 AM, Roger Bivand wrote: > On Sun, 30 Apr 2017, Anne C. Hanna wrote: > >> Okay, I think I've tracked

Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-05-01 Thread Roger Bivand
On Sun, 30 Apr 2017, Anne C. Hanna wrote: Okay, I think I've tracked it down. This is... absurdly complicated and I don't know what the actual correct resolution is, but I'm pretty sure that at least I know what's going wrong. Good, and thanks for staying with this. I've pushed a fix to my

Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-04-30 Thread Anne C. Hanna
Okay, I think I've tracked it down. This is... absurdly complicated and I don't know what the actual correct resolution is, but I'm pretty sure that at least I know what's going wrong. Basically it comes down to the fact that createSPComment() does not actually check whether each individual

Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-04-30 Thread Anne C. Hanna
Roger, Unfortunately I have a use case for you of createSPComment() not working. I tried your new version of disaggregate() on the original test script I sent you, and it does seem to have fixed all the cases in there. However, when I tried it on my actual data, it had the same failure mode as

Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-04-29 Thread Roger Bivand
On Sat, 29 Apr 2017, Anne C. Hanna wrote: Roger, This looks great, and I will try it out ASAP. I do have one reservation though --- it seems you are using createSPComment() to reconstruct the comments, and I have seen some discussion that that may not be reliable in all cases (e.g. if the

Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-04-28 Thread Anne C. Hanna
Roger, This looks great, and I will try it out ASAP. I do have one reservation though --- it seems you are using createSPComment() to reconstruct the comments, and I have seen some discussion that that may not be reliable in all cases (e.g. if the initial polygons are wonky in some way). I

Re: [R-sig-Geo] sp::disaggregate() does not seem to add the necessary "comment" attribute to identify holes if Polygons does not contain exactly 1 polygon with 0 or 1 holes

2017-04-28 Thread Roger Bivand
I've pushed the fix to my fork: https://github.com/rsbivand/sp and created a pull request: https://github.com/edzer/sp/pull/28 Only one part of a complicated set if nested if() in disaggregate() was adding comments, but in some settings the existing comments survived the disaggregation. Now