eblondel / cleangeo

Cleaning geometries from spatial objects in R

Home Page:https://github.com/eblondel/cleangeo/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rgeos warning

DerekYves opened this issue · comments

Hi again! There's a number of moving parts between the last time I submitted a bug report (new R versions, sp updates, and new versions of your package), but I'm no longer able to clean the same shape file I was working with. It used to complete in seconds, but I'm getting errors such as the following in the verbose output of clgeo_Clean:

[cleangeo][INFO] Catched RGEOS warning 'simpleWarning in RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid"): Ring Self-intersection at or near point -2884367.4982672399 3537417.1548343902
' 
[cleangeo][INFO] Catched RGEOS warning 'simpleWarning in RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid"): Ring Self-intersection at or near point -2258215.72911544 2346387.0472559901
' 

The summary and isValid outout for this shapefile are:

> clgeo_SummaryReport(report)
             type      valid                 issue_type
 rgeos_validity: 8   Mode :logical   GEOM_VALIDITY: 8  
 NA's          :91   FALSE:8         NA's         :91  
                     TRUE :91                          
                     NA's :0                           
> clgeo_IsValid(tec_rx_laea_raw, verbose=TRUE)
[cleangeo][INFO] Catched RGEOS warning 'simpleWarning in RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid"): Ring Self-intersection at or near point -2884367.4982672399 3537417.1548343902
' 
[1] FALSE

Happy to provide you with a copy of the shape file off line if you have time to look at it. Would it be advisable to revert to the "buffer" strategy? With this method it completes in the "normal" amount of time with this output:

[cleangeo][INFO] Cleaning geometry at index 2 (Ring Self-intersection at or near point -2884367.4982672399 3537417.1548343902) 
[cleangeo][INFO] Cleaning geometry at index 18 (Self-intersection at or near point 2113533.1055950201 -820989.46085422998) 
[cleangeo][INFO] Cleaning geometry at index 36 (Self-intersection at or near point 2201242.5476380899 -122464.20489261999) 
[cleangeo][INFO] Cleaning geometry at index 48 (Self-intersection at or near point -663318.71329095995 -1008727.5029289901) 
[cleangeo][INFO] Cleaning geometry at index 51 (Ring Self-intersection at or near point 2305334.6818985799 211472.93414217001) 
[cleangeo][INFO] Cleaning geometry at index 69 (Ring Self-intersection at or near point -764312.57034562004 -1104824.43560423) 
[cleangeo][INFO] Cleaning geometry at index 78 (Self-intersection at or near point 1783130.8072641599 -1814850.07555165) 
[cleangeo][INFO] Cleaning geometry at index 94 (Self-intersection at or near point 795575.92022841994 -1689707.2803640501) 

All the best,
Derek

PS: Possibly of note, this shape file has the following Albers-type CRS:

CRS("+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs")


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

send the shapefile to my email address

rgeos is not used anymore as it is going to be archived in Oct 2023