r-spatial / lwgeom

bindings to the liblwgeom library
https://r-spatial.github.io/lwgeom/
58 stars 23 forks source link

in st_split st_combine blade if length > 1 #43

Closed tim-salabim closed 5 years ago

tim-salabim commented 5 years ago

This PR addresses a slight discrepancy between documentation and code. In the documentation for st_split it is noted that

if y contains more than one feature geometry, the geometries are st_combined

though this didn't happen in the code. It simply threw an error via stopifnot(length(y) == 1). Therefore I have adjusted the code to accommodate what the documentation states.

The issue was originally raised in this SO question

edzer commented 5 years ago

Thanks, Tim!