prantogg commented on code in PR #1251: URL: https://github.com/apache/sedona/pull/1251#discussion_r1510341814
########## common/src/main/java/org/apache/sedona/common/Functions.java: ########## @@ -310,110 +349,131 @@ public boolean isGeometryChanged() { return geometry; } - public static Double x(Geometry geometry) { + public static Geometry envelope (Geometry geometry){ + return geometry.getEnvelope(); + } + + public static double distance (Geometry left, Geometry right){ + return left.distance(right); + } + + public static double distance3d (Geometry left, Geometry right){ + return new Distance3DOp(left, right).distance(); + } + + public static double length (Geometry geometry){ + return geometry.getLength(); + } + + public static Geometry normalize (Geometry geometry){ + geometry.normalize(); + return geometry; + } + + public static Double x (Geometry geometry){ if (geometry instanceof Point) { return geometry.getCoordinate().x; } return null; } - public static Double y(Geometry geometry) { + public static Double y (Geometry geometry){ if (geometry instanceof Point) { return geometry.getCoordinate().y; } return null; } - public static Double z(Geometry geometry) { + public static Double z (Geometry geometry){ if (geometry instanceof Point) { return geometry.getCoordinate().z; } return null; } - public static double xMin(Geometry geometry) { + public static double xMin (Geometry geometry){ Coordinate[] points = geometry.getCoordinates(); double min = Double.MAX_VALUE; - for(int i=0; i < points.length; i++){ + for (int i = 0; i < points.length; i++) { min = Math.min(points[i].getX(), min); } return min; } - public static double xMax(Geometry geometry) { + public static double xMax (Geometry geometry){ Review Comment: My IDE (IntelliJ) automatically reformatted the code style when resolving merge conflicts. Should I rollback these format changes? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@sedona.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org