Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-118

ST_Within uses wrong JTS Function

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.1
    • 1.2.1

    Description

      The eval method of ST_Within (in file Predicates.scala) calls the function coveredBy of JTS. Instead, it should call the within function. 

      As a result, now, the expression 

      ST_Within(ST_GeomFromWKT('POINT(0 0)'),ST_GeomFromWKT('POLYGON ((0.0 0.0, 10.0 0.0, 10.0 10.0, 0.0 10.0, 0.0 0.0))')) 

      returns true, whereas the correct behaviour according to the simple features specification for sql should be false.

      Also, the toString method of the ST_Within is wrong.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dbilid Dimitris Bilidas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment