Improve BufferedLine geodesic skew compensation
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by locating BufferedLineString, BufferedLine, and the expandBufForLongitudeSkew option. Read how the current buffer is expanded for latitude and how linePrimary and linePerp are represented. Done means the two axes account for latitude and line angle separately, the non-perpendicular effect is handled, and end-cap buffering can be omitted without changing the intended geometry.
Written by the indexing model from the issue text.
Description
BufferedLineString expands each of it's BufferedLine's buffer by a fixed amount depending on how close to a pole it is (see the "expandBufForLongitudeSkew" option). But this implementation is poor since it uniformly increases the buffer on both axis by this amount, which might be too much as well. BufferedLine should maintain a distinct buffer distance for both axis, since each axis will have a different stretch factor dependent on not only the latitude but the angle (slope) of the line. For example a vertical line will have the full stretch applied to the "linePrimary" axis, while the "linePerp" will have no stretch. The reverse for a horizontal line. And for in-between (e.g. a 45-degree line), it should be mixed proportionally.
Another adjustment is that linePerp will not be completely perpendicular to linePrimary due to the stretching. Without stretching it's 90 degrees difference but stretch an X and it flattens and the angle isn't 90 any more.
What we do assume here that technically isn't true, is that the stretching is completely uniform.
A side-effect of this feature is that BufferedLine will additionally be usable without an end-cap buffer (i.e. it chops off at both points). So if we want a circular end-cap style we simply need to add a circle shape to the mix without altering BufferedLine.
- Dominant language
- Java
- Stars
- 961
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from locationtech/spatial4j
-
question
Difficulty 5/5 Over a week Newbie friendliness 20/100
locationtech/spatial4j#233 · 1 comment ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
locationtech/spatial4j#232 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
locationtech/spatial4j#231 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
locationtech/spatial4j#230 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
locationtech/spatial4j#227 · 2 comments ·
All issues in locationtech/spatial4j
Similar issues
-
cbor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
FasterXML/jackson-dataformats-binary#844 ·
Maintainers usually reply within 1 day
-
improvement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/iceberg#18351 · 1 comment ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
repowise-dev/repowise#2945 · 1 comment ·
Maintainers usually reply within 1 day
-
Interpolating settings.xml can lead to malformed XML when variable value contains double-hyphenOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/maven#13321 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liquid-java/liquidjava#321 ·
Maintainers usually reply within 2 days