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

ST_Buffer() returns GEOMETRYCOLLECTION(POLYGON, LINESTRING) for very short LINESTRING

    XMLWordPrintable

Details

    • Unexpected results

    Description

      ST_Buffer() returns a GEOMETRYCOLLECTION(POLYGON, LINESTRING) for a very short valid LINESTRING when the buffer distance is relatively large.

      Minimal reproduction:

      SELECT
          GeometryType(
              ST_Buffer(
                  ST_GeomFromText(
                      'LINESTRING(
                          -0.3434795 52.2352269,
                          -0.3434789 52.2352327
                      )'
                  ),
                  0.00045
              )
          ) AS buffer_type,
          ST_AsText(
              ST_Buffer(
                  ST_GeomFromText(
                      'LINESTRING(
                          -0.3434795 52.2352269,
                          -0.3434789 52.2352327
                      )'
                  ),
                  0.00045
              )
          ) AS buffered_geometry;
      

      Result

      GEOMETRYCOLLECTION(
          POLYGON(...),
          LINESTRING(...)
      )
      

      With smaller buffer distances such as 0.00001, 0.00005, 0.00010 and 0.00020, the same geometry returns a POLYGON.

      Expected: ST_Buffer() should return a POLYGON.

      Actual: at 0.00045 it returns a GEOMETRYCOLLECTION containing a polygon plus a small residual linestring.

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            ChrisHSandN Chris Hewett
            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.