[R-sig-Geo] Handling invalid geometries from the ‘mapdata’ package
Roger Bivand
Roger.Bivand at nhh.no
Mon Mar 28 15:13:50 CEST 2011
On Mon, 28 Mar 2011, Karl Ove Hufthammer wrote:
> Roger Bivand wrote:
>
>>> pls1 <- lapply(pls, checkPolygonsHoles)
>> Error in RGEOSBinPredFunc(spgeom1, spgeom2, byid, "rgeos_equals") :
>> TopologyException: side location conflict at 78.9364 33.4081
>>
>> then I can reproduce it, and will examine whether it can be handled - the
>> checkPolygonsHoles() function also uses GEOS, but probably should warn
>> after failing try(gEquals(...)).
>>
>> Was this your error?
>
> Yes.
>
> I also eventually managed to get a segfault when trying various stuff like
> this, but it may have been unrelated. (At least, I can’t reproduce it.)
Thanks. Updating to maptools 0_8-5 and rgeos 0_1-3 (sources on CRAN now)
should provide better protection against non-conformant data causing a
seg-fault in GEOS - GEOS really likes its polygons *very* tidy.
Roger
>
> --
> Karl Ove Hufthammer
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list