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

Implement the GIS function ST_Validate

    XMLWordPrintable

Details

    Description

      This function takes as input a geometry and verifies that:

      If the input is valid return it, else it returns NULL. The use case of this function is to filter out invalid geometry data.

      The following exceptions apply:

      • If an input Polygon or MultiPolygon has clockwise rings, those rings are reversed before checking for validity. The value with the reversed rings is returned if the geometry is valid.
      • The only valid empty geometry is represented as an empty geometry collection value. ST_Validate() returns it directly without further checks in this case.
      • If the geometry has a geographic SRS with a longitude or latitude that is out of range, an error occurs:
        • If a longitude value is not in the range (−180, 180], an ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE error occurs.
        • If a latitude value is not in the range [−90, 90], an ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE error occurs.

      This function has to be compatible with the MySQL function ST_Validate and for this reason, part of this card is taken from https://dev.mysql.com/doc/refman/8.0/en/spatial-convenience-functions.html .

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              Stefano Petrilli Stefano Petrilli
              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.