jiayuasu commented on code in PR #2831:
URL: https://github.com/apache/sedona/pull/2831#discussion_r3104403376


##########
common/src/main/java/org/apache/sedona/common/S2Geography/GeographyWKBSerializer.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.common.S2Geography;
+
+import java.io.IOException;
+import java.util.Arrays;
+import org.locationtech.jts.io.ByteOrderValues;
+
+/**
+ * Serializer for Geography objects using WKB as the primary format. Supports 
backward-compatible
+ * reading of legacy S2-native serialized data. Format discrimination by first 
byte: 0xFF for WKB
+ * format [0xFF][4-byte SRID big-endian][WKB payload], or 1-10 for legacy 
S2-native format.

Review Comment:
   I suggest we remove the backward compatibility of the S2 native format 
unless it helps with the performance. This will reduce the complexity of the 
codebase. The S2 SerDe format is never announced and we don't expect active 
users of this feature.



-- 
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