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

Wrong results from st_isvalid or st_validate function, while using multipolygon

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Critical
    • Resolution: Unresolved
    • None
    • 11.8
    • GIS
    • None

    Description

      MariaDB [test]> select ST_isvalid(ST_GEOMFROMTEXT('multipolygon(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)), ((59 18,67 18,67 13,59 13,59 18)))')) a;
      +------+
      | a    |
      +------+
      |    0 |
      +------+
      1 row in set (0,002 sec)
       
      MariaDB [test]>  select ST_isvalid(ST_GEOMFROMTEXT(' MULTIPOLYGON((( 0 0, 6 0, 1 2, 0 0)), (( 7 7, 1 8, 7 0, 7 7 ))) ')) a;
      +------+
      | a    |
      +------+
      |    0 |
      +------+
      1 row in set (0,002 sec)
      MariaDB [test]>  select ST_VALIDATE(ST_GEOMFROMTEXT(' MULTIPOLYGON((( 0 0, 6 0, 1 2, 0 0)), (( 7 7, 1 8, 7 0, 7 7 ))) ')) a;
      +------+
      | a    |
      +------+
      | NULL |
      +------+
      1 row in set (0,002 sec)
       
      MariaDB [test]> select ST_VALIDATE(ST_GEOMFROMTEXT('multipolygon(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)), ((59 18,67 18,67 13,59 13,59 18)))')) a;
      +------+
      | a    |
      +------+
      | NULL |
      +------+
      1 row in set (0,002 sec)
      
      

      Mysql:

      mysql> select ST_isvalid(ST_GEOMFROMTEXT('multipolygon(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)), ((59 18,67 18,67 13,59 13,59 18)))')) a;
      +------+
      | a    |
      +------+
      |    1 |
      +------+
      1 row in set (0,00 sec)
       
      mysql>  select ST_isvalid(ST_GEOMFROMTEXT(' MULTIPOLYGON((( 0 0, 6 0, 1 2, 0 0)), (( 7 7, 1 8, 7 0, 7 7 ))) ')) a;
      +------+
      | a    |
      +------+
      |    1 |
      +------+
      1 row in set (0,00 sec)
      

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.