Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-35790

The negative buffer of Polygon does not within itself

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.4
    • 10.6, 10.11, 11.4
    • GIS
    • None

    Description

      For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.

      SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
      SET @g2 = ST_Buffer(@g1, -10);
       
      SELECT ST_Within(@g2, @g1);
      -- expected: {1}
      -- actual : {0}
      

      Attachments

        Activity

          nbvfgh Shijie Li created issue -
          nbvfgh Shijie Li made changes -
          Field Original Value New Value
          Description For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.
          {code:sql}
          SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
          SET @g2 = ST_Buffer(@g1, -10);

          SELECT ST_Within(@g2, @g1);
          -- expected: {0}
          -- actual : {1}
          {code}
          For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.
          {code:sql}
          SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
          SET @g2 = ST_Buffer(@g1, -10);

          SELECT ST_Within(@g2, @g1);
          -- expected: {0}
          -- actual : {1}
          {code}
          nbvfgh Shijie Li made changes -
          Description For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.
          {code:sql}
          SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
          SET @g2 = ST_Buffer(@g1, -10);

          SELECT ST_Within(@g2, @g1);
          -- expected: {0}
          -- actual : {1}
          {code}
          For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.
          {code:sql}
          SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
          SET @g2 = ST_Buffer(@g1, -10);

          SELECT ST_Within(@g2, @g1);
          -- expected: {0}
          -- actual : {1}
          {code}
          nbvfgh Shijie Li made changes -
          Description For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.
          {code:sql}
          SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
          SET @g2 = ST_Buffer(@g1, -10);

          SELECT ST_Within(@g2, @g1);
          -- expected: {0}
          -- actual : {1}
          {code}
          For ST_Buffer, a negative distance shrinks the geometry rather than expanding it. So the negative buffer of a Polygon should be in the Polygon.
          {code:sql}
          SET @g1 = ST_GeomFromText('POLYGON((83 32,-23 113,-96 240,-87 246,-89 249,-33 287,174 35,175 32,118 0,96 38,83 32),(98 40,97 39,96 39,98 40))');
          SET @g2 = ST_Buffer(@g1, -10);

          SELECT ST_Within(@g2, @g1);
          -- expected: {1}
          -- actual : {0}
          {code}
          serg Sergei Golubchik made changes -
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.6 [ 24028 ]
          Affects Version/s 10.11 [ 27614 ]
          Affects Version/s 11.4 [ 29301 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.4 [ 29301 ]
          serg Sergei Golubchik made changes -
          Assignee Dave Gosselin [ JIRAUSER52216 ]

          People

            Gosselin Dave Gosselin
            nbvfgh Shijie Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.