You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2024/01/01 09:28:08 UTC

Re: [PR] [SEDONA-369] Add ST_DWithin [sedona]

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


##########
common/src/main/java/org/apache/sedona/common/Predicates.java:
##########
@@ -49,4 +49,11 @@ public static boolean disjoint(Geometry leftGeometry, Geometry rightGeometry) {
     public static boolean orderingEquals(Geometry leftGeometry, Geometry rightGeometry) {
         return leftGeometry.equalsExact(rightGeometry);
     }
+    public static boolean dWithin(Geometry leftGeometry, Geometry rightGeometry, double distance) {
+        int leftSrid = leftGeometry.getSRID(), rightSrid = rightGeometry.getSRID();

Review Comment:
   I suggest that we don't perform CRS check in Predicates because all other predicates do not check it.
   
   If we want to enforce this check, please raise another PR for this specific issue. Moreover, what is the default value of SRID if the user don't specify it at all? I think it is `0`? If so, this check will work. If it is `null`, then this check will not work.



-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org