[
https://issues.apache.org/jira/browse/SEDONA-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551690#comment-17551690
]
Jia Yu commented on SEDONA-119:
-------------------------------
This is caused by a bug in Sedona optimized SQL spatial join pattern matching.
Will fix it soon.
> ST_Touches join query returns true for polygons whose interiors intersect
> -------------------------------------------------------------------------
>
> Key: SEDONA-119
> URL: https://issues.apache.org/jira/browse/SEDONA-119
> Project: Apache Sedona
> Issue Type: Bug
> Affects Versions: 1.2.1
> Reporter: Dimitris Bilidas
> Priority: Major
>
> Consider the following example:
>
> {code:java}
> var polygonDf1 = sparkSession.sql("select ST_GeomFromWKT('POLYGON ((0 0, 10
> 10, 10 0, 0 0))') as p1")
> polygonDf1.createOrReplaceTempView("polygondf1")
> var polygonDf2 = sparkSession.sql("select ST_GeomFromWKT('POLYGON ((0 0, 1 1,
> 1 0, 0 0))') as p2")
> polygonDf2.createOrReplaceTempView("polygondf2")
> var rangeJoinDf = sparkSession.sql("select * from polygondf1, polygondf2
> where ST_Touches(polygondf1.p1,polygondf2.p2) ") {code}
> The correct result should be empty, but SEDONA returns a result.
>
> In case of a spatial filter, the correct result is returned. That is, if we
> replace the last query with:
> {code:java}
> select * from polygondf1 where
> ST_Touches(polygondf1.p1,ST_GeomFromWKT('POLYGON ((0 0, 1 1, 1 0, 0
> 0))')){code}
> Then, the result is indeed empty.
> I have checked that JTS version 1.18.2 returns the correct answer, so the
> problem must be somewhere else.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)