Skip to content
Prev 25983 / 29559 Next

st_area / st_transform / crs

On 16/09/17 13:52, Jean-Luc Dupouey wrote:
If you then would read the documentation of geosphere::areaPolygon, you
can read that it needs sp objects as its input; sf converts to Spatial
(sp), then calls areaPolygon on that object.

try

laywgs = st_transform(st_cast(lay, "MULTIPOLYGON"), 4326)

to make this conversion less painful.
Thanks for bringing this up - I understand it is confusing, and we might
be able to make this simpler from the sf side.