paleolimbot / geos

Open Source Geometry Engine ('GEOS') R API
https://paleolimbot.github.io/geos/
Other
61 stars 8 forks source link

geos_concave_hull with ratio = 1 creates convex hull #71

Closed JosiahParry closed 2 years ago

JosiahParry commented 2 years ago

The argument ratio is defined as

The ratio between the area of the concave hull and the area of the return value. Use 1 for the concave hull; use 0 for maximum concave-ness.

However, when setting ratio = 1, the convex hull is returned. The below gist is a reticulated R markdown which compares the output of geos_concave_hull() with the convex hull from pysal. Included in the comment is the environment.yml I use for my conda env too, just in case.

https://gist.github.com/JosiahParry/d0fcbb883188a443f5642c8b98d2338e

JosiahParry commented 2 years ago

Red is the pysal convex hull and black is the geos concave hull.

image
paleolimbot commented 2 years ago

If I'm understanding correctly, the error is that the R documentation is wrong? (i.e., 1 produces the convex hull and not the concave hull). I believe that's what was intended.

JosiahParry commented 2 years ago

Yes, correct! Apolgies :) early morning

paleolimbot commented 2 years ago

All good! It was late night when I wrote those docs...