Skip to content

Including st_minimum_bounding_radius#99

Merged
edzer merged 1 commit into
r-spatial:masterfrom
lcgodoy:master
Jan 12, 2026
Merged

Including st_minimum_bounding_radius#99
edzer merged 1 commit into
r-spatial:masterfrom
lcgodoy:master

Conversation

@lcgodoy
Copy link
Copy Markdown
Contributor

@lcgodoy lcgodoy commented Dec 2, 2025

Hello everyone,

This PR implements st_minimum_bounding_radius, a function that returns the center and radius of the minimum bounding circle for a geometry.

Currently, users requiring only the circle parameters must generate the full polygon via st_minimum_bounding_circle (with the st_buffer overhead) and then post-process it to derive the circles' centroid and area. This implementation allows for direct, efficient retrieval of these parameters and matches the PostGIS ST_MinimumBoundingRadius function.

I updated the documentation accordingly by documenting st_minimum_bounding_radius alongside st_minimum_bounding_circle. Note that for sfg and sfc inputs, the function currently returns only the circles’ centers to maintain class consistency and a warning is issued in these cases to explain the behavior.

I have not included any tests with the function because I was unsure about helpful tests in this case.

Please let me know if you have any suggestions or if fixes are needed to get this merged.

Cheers.

@edzer edzer merged commit 9d8e22d into r-spatial:master Jan 12, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants