Skip to content

Commit bdaef83

Browse files
committed
clean up code
1 parent 967f34b commit bdaef83

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

R/geom-transformers.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,10 @@ st_voronoi.sfc = function(x, envelope = st_polygon(), dTolerance = 0.0, bOnlyEdg
564564
if (compareVersion(CPL_geos_version(), "3.5.0") > -1) {
565565
if (isTRUE(st_is_longlat(x)))
566566
warning("st_voronoi does not correctly triangulate longitude/latitude data")
567-
if (compareVersion(CPL_geos_version(), "3.12.0") > -1) {
568-
bOnlyEdges = as.integer(bOnlyEdges)
569-
if (point_order) bOnlyEdges = 2L # GEOS enum GEOS_VORONOI_PRESERVE_ORDER
570-
} else {
571-
if (point_order)
567+
if (point_order) {
568+
if (compareVersion(CPL_geos_version(), "3.12.0") > -1)
569+
bOnlyEdges = 2L # GEOS enum GEOS_VORONOI_PRESERVE_ORDER
570+
else
572571
warning("Point order retention not supported for GEOS ", CPL_geos_version())
573572
}
574573
st_sfc(CPL_geos_voronoi(x, st_sfc(envelope), dTolerance = dTolerance,

0 commit comments

Comments
 (0)