[geos-devel] troubles with gPolygonize
Roger Bivand
Roger.Bivand at nhh.no
Wed Feb 6 01:19:33 PST 2013
This is a question about the use of the R package rgeos, which provides GEOS
for sp classes. Consequently, this list is not a good choice; the R-sig-geo
list would have been better. You have also not provided version information
on rgeos, GEOS, or R; the two first are shown when rgeos is loaded, the
latter as output from sessionInfo().
The problem was an assumption in the R code providing IDs for the output
objects, not in GEOS. A fix has been committed to the R-Forge SVN repository
for rgeos, together with your case in the examples for the function. If you
can, please check out the source:
svn checkout svn://svn.r-forge.r-project.org/svnroot/rgeos/
and report back on whether the fix also works for your real use case.
Roger
Masucci, A wrote
> Hi,
> gPolygonize doesn't work with some simple geometries.
> Here is an example:
>
>> LS = list(
> + readWKT("LINESTRING (425963 576719, 425980 576703)"),
> + readWKT("LINESTRING (425963 576719, 425882 577073)"),
> + readWKT("LINESTRING (425980 576703, 426082 577072)"),
> + readWKT("LINESTRING (425882 577073, 426082 577072)"),
> + readWKT("LINESTRING (426138 577068, 426082 577072)"),
> + readWKT("LINESTRING (426138 577068, 426420 577039)"),
> + readWKT("LINESTRING (426420 577039, 426554 576990)"),
> + readWKT("LINESTRING (426751 576924, 426776 576823)"),
> + readWKT("LINESTRING (426751 576924, 426783 576919)"),
> + readWKT("LINESTRING (426751 576924, 426714 576953)"),
> + readWKT("LINESTRING (426776 576823, 426783 576919)"),
> + readWKT("LINESTRING (426658 576966, 426554 576990)"),
> + readWKT("LINESTRING (426658 576966, 426667 577031)"),
> + readWKT("LINESTRING (426658 576966, 426714 576953)"),
> + readWKT("LINESTRING (426667 577031, 426714 576953)")
> + )
>> gPolygonize(LS)
>
> Traceback:
> 1: .Call("rgeos_polygonize", .RGEOS_HANDLE, splist, id, p4s, getCutEdges,
> PACKAGE = "rgeos")
> 2: gPolygonize(LS)
> Error in gPolygonize(LS) : caught access violation - continue with care
>
> I hope you can help me
> Kindest regards
>
> Paolo
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at .osgeo
> http://lists.osgeo.org/mailman/listinfo/geos-devel
-----
Roger Bivand
NHH Norwegian School of Economics, Bergen, Norway
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/troubles-with-gPolygonize-tp5032205p5032412.html
Sent from the GEOS Developers mailing list archive at Nabble.com.
More information about the geos-devel
mailing list