Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MinimumAreaRectangle #977

Merged
merged 9 commits into from
Apr 30, 2023
Merged

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Apr 25, 2023

To address libgeos/geos#679 (see #907), this adds a MinimumAreaRectangle class implementing the standard "rotating-calipers` algorithm for computing a Minimum-Area Rectangle.

MinimumDiameter.getMinimumRectangle was previously used for this, but it does not always compute the Minimum-Area Rectangle. It is kept available, for backwards compatibility. Also, it computes the Minimum-Width Rectangle, which may be useful.

image

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dr-jts dr-jts merged commit 71fc02e into locationtech:master Apr 30, 2023
2 checks passed
@dr-jts dr-jts deleted the add-min-rectangle branch April 30, 2023 18:19
pramsey added a commit to libgeos/geos that referenced this pull request May 26, 2023
Port of locationtech/jts#977
This adds a MinimumAreaRectangle class implementing the
standard "rotating-calipers` algorithm for computing a Minimum-Area Rectangle.

MinimumDiameter.getMinimumRectangle was previously used
for this, but it does not always compute the Minimum-Area
Rectangle. It is kept available, for backwards compatibility.
Also, it computes the Minimum-Width Rectangle, which may be useful.

The CAPI GEOSMinimumRotatedRectangle is now bound to
MinimumAreaRectangle rather than MinimumDiameter.getMinimumRectangle
@willcohen
Copy link
Contributor

@pramsey and @dr-jts
Just want to say thank you for this -- this has been quite useful as I work on determining a first pass for regularizing city parcel boundaries to determine depth and width when they're rectangular-ish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants