Add RadialDistanceByAngleSimplifier (#69) to jts-lab#83
Add RadialDistanceByAngleSimplifier (#69) to jts-lab#83FObermaier wants to merge 4 commits intolocationtech:masterfrom
Conversation
Added RadialDistanceByAngleSimplifierTest
|
Not sure about the provenance and sign-off on this code. @jnh5y any thoughts? The code apparently authored by harelm, but commited by FObermaier - is that acceptable? |
|
The initial concept and coding template is by @HarelM based on NTS, the port to JTS is my work. |
| @@ -0,0 +1,123 @@ | |||
| package org.locationtech.jtslab.simplify; | |||
|
|
|||
| import org.locationtech.jts.geom.Coordinate; | |||
There was a problem hiding this comment.
This file needs a license header.
| * This class follows the JTS simplifier pattern | ||
| * | ||
| * @author | ||
| * Harel M (https://github.com/harelm) |
There was a problem hiding this comment.
@FObermaier can you say more about the provenance here? If you can link to the project, that might help. Generally, if we get a quick 'ok' from the original author for creating the derivative work, that'd be best.
There was a problem hiding this comment.
Original code can be seen here:
https://github.com/IsraelHikingMap/Site/blob/master/IsraelHiking.API/Services/RadialDistanceByAngleSimplifier.cs
You have my blessing.
| @@ -0,0 +1,249 @@ | |||
| /* | |||
| * Copyright (c) 2016 Vivid Solutions. | |||
There was a problem hiding this comment.
This copyright is incorrect
|
Quick "OK" 😊 |
|
Also worth mentioning somewhere that this simplifier works better after Douglas-Packard simplification from my experience, not sure where you'd put such comment. |
|
@HarelM That would be appropriate for the class Javadoc. Is it possible to quantify/qualify how it is better? E..g better performance, or better quality of output? |
Added missing information about provenance of the code
|
@FObermaier, in order to accept this PR, you'd need to fill out the Eclipse Contributor Agreement for felix.obermaier@netcologne.de. The paperwork is here: https://www.eclipse.org/legal/ECA.php. |
|
@jnh5y I just did that. |
|
@FObermaier thanks! @dr-jts back to you for the regularly scheduled PR review:). |
| * | ||
| * @return A simplified {@link Geometry} | ||
| */ | ||
| public static Geometry Simplify(Geometry geometry, double distanceTolerance, double angleTolerace) |
There was a problem hiding this comment.
This method name should start with lowercase.
|
Is there any support for changing the name of this algorithm to something slightly more descriptive? Say |
|
I have no objection to the new name, it sounds more descriptive and less confusing indeed. |
|
I don't have any objections either. Do you want me to refactor it? |
|
@FObermaier Would be great if you can do the rename. |
Signed-off-by: FObermaier <felix.obermaier@netcologne.de>
|
In case anyone is interested, I wrote a short wiki page about the algorithm to find unmapped OSM routes. it uses this simplifier. |


Added RadialDistanceByAngleSimplifierTest