-
Notifications
You must be signed in to change notification settings - Fork 443
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
Make Geometry.reverse() consistent #513
Make Geometry.reverse() consistent #513
Conversation
* Add protected reverseInternal function to Geometry, implement in Point, LineString, LinearRing, Polygon and GeometryCollection * Remove abstract from Geometry.reverse function, implementation calls reverseInternal and copies Envelope and SRID values * To avoid breaking change make Geometry.reverse overrides return super.reverse() * Add unit test Note: The reversal of items in MultiLineString has been removed. relates to locationtech#305 Signed-off-by: Felix Obermaier <felix.obermaier@netcologne.de>
* Fix ExtractLineByLocation to not use deprecated Geometry.reverse() overrides * Remove dead code relates to locationtech#305 Signed-off-by: Felix Obermaier <felix.obermaier@netcologne.de>
* LengthIndexedLineTest.testExtractLineReverseMulti relates to locationtech#305 Signed-off-by: Felix Obermaier <felix.obermaier@netcologne.de>
6634ae3
to
4b67365
Compare
Thanks, code looks good. It's unfortunate that the commits are cluttered up with formatting changes (mainly whitespace removal). Not sure if it's possible to avoid this? |
IntelliJ did that. I must admit I like it. See #397. |
Yes, I like consistent formatting as well (have been working with Go lately, and it's opinionated formatting works very well). It's just not ideal to mix formatting changes and code changes, since the code changes get swamped by all the trivial format changes. |
Oh, great, didn't know that was available. That helps with reviewing for sure. |
Updated for consistency with the behavior of other geometry types (as changed in locationtech/jts#513)
Updated for consistency with the behavior of other geometry types (as changed in locationtech/jts#513) Fixes #1013
Updated for consistency with the behavior of other geometry types (as changed in locationtech/jts#513) Fixes #1013
@FObermaier the deprecations on the subclass |
I'm no java expert. I wanted to avoid introducing a breaking change. I was not aware that this causes other issues. |
@FObermaier understood. This is a trickier design situation than it first appears. |
implement in Point, LineString, LinearRing, Polygon and
GeometryCollection
implementation calls reverseInternal and copies
Envelope and SRID values
return super.reverse()
Note:
The reversal of items in MultiLineString has been removed.
closes to #305
Signed-off-by: Felix Obermaier felix.obermaier@netcologne.de