jiayuasu commented on code in PR #2223:
URL: https://github.com/apache/sedona/pull/2223#discussion_r2258257465
##########
common/src/main/java/org/apache/sedona/common/geometryObjects/Geography.java:
##########
@@ -18,20 +18,60 @@
*/
package org.apache.sedona.common.geometryObjects;
-import org.locationtech.jts.geom.Geometry;
+import com.esotericsoftware.kryo.io.UnsafeOutput;
+import com.google.common.geometry.S2Region;
+import com.google.common.geometry.S2Shape;
+import java.io.IOException;
+import org.apache.sedona.common.S2Geography.EncodeOptions;
+import org.apache.sedona.common.S2Geography.S2Geography;
-public class Geography {
- private final Geometry geometry;
+public class Geography extends S2Geography {
+ // Hold the underlying S2Geography directly, not another Geography
+ private final S2Geography delegate;
- public Geography(Geometry geometry) {
- this.geometry = geometry;
+ public Geography(S2Geography delegate) {
+ // Initialize super with the correct kind
+ super(GeographyKind.fromKind(delegate.getKind()));
+ this.delegate = delegate;
}
- public Geometry getGeometry() {
- return this.geometry;
+ /** Return the wrapped S2Geography. */
+ public Geography getGeography() {
+ return (Geography) delegate;
Review Comment:
I think this comment from AI is correct. We should fix this.
--
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]