-
Notifications
You must be signed in to change notification settings - Fork 1
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 reducer support #169
Add reducer support #169
Conversation
// to reduce processing time. | ||
@Getter | ||
@Setter | ||
protected static Double reducerPrecision = null; | ||
|
||
// Load a coastline shape file so that we can get a spatial extents that cover sea only | ||
public static void init() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this class is growing bigger and bigger and its readability is somehow affected. It has quite a lot of static methods too. Maybe can refactor / group narrower scope's related methods into separate classes (like saveResourceToTemp is not really directly related to "geometry") and use dependency injection and reduce the size of GeometryUtils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok let me move this out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved out
@@ -75,7 +88,7 @@ public static void init() { | |||
Geometry simplifiedGeometry = DouglasPeuckerSimplifier | |||
.simplify(landFeatureGeometry, getCoastalPrecision()); // Adjust tolerance | |||
|
|||
geometries.add(simplifiedGeometry); | |||
geometries.add(reducer != null ? reducer.reduce(simplifiedGeometry) : simplifiedGeometry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a test case
No description provided.