-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SEDONA-369] Add ST_DWithin #1175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder, since ST_DWithIn
is a spatial predicate, we need to support it in our optimized spatial join. You can address this issue in another PR.
@@ -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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
* Add ST_DWithin * Add documentation for ST_DWithin * Remove unwanted code * removed null check test for ST_DWithin * Fix EOF lint error * Add explanation for ST_DWithin * Remove CRS checking logic in ST_DWithin
Did you read the Contributor Guide?
Is this PR related to a JIRA ticket?
[SEDONA-XXX] my subject
.What changes were proposed in this PR?
How was this patch tested?
Did this PR include necessary documentation updates?
vX.Y.Z
format.