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

ST_PointOnSurface returns NULL with Polygon in some case

    XMLWordPrintable

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

      Considering following query:

      SET @g1 = ST_GeomFromText('POLYGON((0 0, 0 1,1 1, 1 0, 0 0))');
      SET @g2 = ST_GeomFromText('POLYGON((-1 0, 1 2, 1 0, -1 0))');
       
      SELECT ST_WITHIN(@g1, @g2);
      -- result:{t}
       
      SELECT ST_ASTEXT(ST_POINTONSURFACE(@g1));
      -- result:{POINT(0.5 0.5)}
       
      SELECT ST_ASTEXT(ST_POINTONSURFACE(@g2));
      -- result:{NULL}
      

      g2 contains g1.
      It's strange that it returns a normal result for g1 but returns NULL for g2.

      Attachments

        Issue Links

          Activity

            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.