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


##########
python/sedona/spark/sql/st_predicates.py:
##########
@@ -91,6 +91,29 @@ def ST_Equals(a: ColumnOrName, b: ColumnOrName) -> Column:
     return _call_predicate_function("ST_Equals", (a, b))
 
 
+@validate_argument_types
+def ST_EqualsExact(
+    a: ColumnOrName,
+    b: ColumnOrName,
+    tolerance: Union[ColumnOrName, float, int],
+) -> Column:
+    """Check whether two geometries have the same structure and coordinate 
ordering
+    within a tolerance.
+
+    The comparison uses x and y coordinates. Z and M coordinates are ignored.
+
+    :param a: One geometry column to check.
+    :type a: ColumnOrName
+    :param b: Other geometry column to check.
+    :type b: ColumnOrName
+    :param tolerance: Maximum distance allowed between corresponding 
coordinates.
+    :type tolerance: ColumnOrName or float

Review Comment:
   Fixed in 15cc146da02: the tolerance type documentation now includes int, 
matching the function signature.



##########
docs/api/sql/Predicates/ST_EqualsExact.md:
##########
@@ -0,0 +1,62 @@
+<!--
+ 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.
+ -->
+
+# ST_EqualsExact
+
+Introduction: Return true if A and B have the same structure and their 
corresponding coordinates are equal within a tolerance.
+
+Unlike `ST_Equals`, this predicate requires geometry types, component order, 
ring order, and vertex order to match. The tolerance is the maximum distance 
allowed between each pair of corresponding coordinates. The comparison uses x 
and y coordinates and ignores z and m coordinates.

Review Comment:
   Fixed in 15cc146da02: changed the introduction to use Returns true and 
capitalized Z and M.



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