locationtech / locationtech/jts
MinumumAreaRectangle with convex hint is limited because all methods are private
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 475
- Avg merge
- 14d 10h
- Merged PRs (30d)
- 1
Description
The constuctor, but not the static factory for MinimumAreaRectangle allows a hint that the input Geometry is already convex. If I use any constructor, though (with or without the hint) I don't see anything at all that I can do with the object that's created because none of the methods are public. I can't get a Geometry from it, for instance like the static factory provides. And the static factory does not support the convex hint. Fixes could include makoing the non-static getMinimumRectangle method public, as well as adding a version of the static factory method with the convex parameter.)
(My ideal use-case goes further: I'd like to be able to get the length and width, or even better, the short and long diameter without checking the other. This is related to MaximumInscribedCircle.isRadiusWithin, which isn't in a public release yet I believe. The first order fix for this class, though, seems to be tweaking what should be public or not.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MinimumAreaRectangle constructors, static factory, and non-static getMinimumRectangle method named in the issue, checking their visibility and available return paths. Clarify which convex-hint and Geometry access API is intended, then add coverage for the selected behavior; done means callers can use the constructed object or factory as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100