jiayuasu commented on code in PR #1527:
URL: https://github.com/apache/sedona/pull/1527#discussion_r1685259716
##########
common/src/main/java/org/apache/sedona/common/utils/BBox.java:
##########
@@ -38,6 +37,64 @@ public BBox(double startLon, double endLon, double startLat,
double endLat) {
this.endLat = endLat;
}
+ public BBox(Geometry geom) {
+ startLon = Double.MAX_VALUE;
+ endLon = -Double.MAX_VALUE;
+ startLat = Double.MAX_VALUE;
+ endLat = -Double.MAX_VALUE;
+ minZ = Double.MAX_VALUE;
+ maxZ = -Double.MAX_VALUE;
+ processEnvelope(geom);
+ }
+
+ private void processEnvelope(Geometry geom) {
Review Comment:
Why is this so complicated? You can see how existing approach read the
coordinates
https://github.com/apache/sedona/blob/master/common/src/main/java/org/apache/sedona/common/Functions.java#L495
--
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]