iGN5117 commented on code in PR #863:
URL: https://github.com/apache/sedona/pull/863#discussion_r1235731944


##########
common/src/main/java/org/apache/sedona/common/Functions.java:
##########
@@ -931,4 +931,34 @@ public static Geometry geometricMedian(Geometry geometry) 
throws Exception {
         return geometricMedian(geometry, DEFAULT_TOLERANCE, DEFAULT_MAX_ITER, 
false);
     }
 
+    public static Geometry boundingDiagonal(Geometry geometry) {
+        if (geometry.isEmpty()) {
+            return GEOMETRY_FACTORY.createLineString();
+        }else {
+            Envelope envelope = geometry.getEnvelopeInternal();

Review Comment:
   Good point, I started out with that initially but ended up using envelope 
for simplicity. I did not take into account its internal implementation.
   Reverted to using 1 loop



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to